Commit graph

29 commits

Author SHA1 Message Date
3a817d6057 fix circuitpython build error
In a51676db5e ("clang-format the lot"), headers were re-ordered.
This is not a change that makes no difference, and caused CircuitPython
to stop building:

../../lib/protomatter/arch.h: In function '_PM_convert_565_word':
../../lib/protomatter/arch.h:1114:3: error: implicit declaration of function 'memset' [-Werror=implicit-function-declaration]
 1114 |   memset(dest, 0, core->bufferSize);
      |   ^~~~~~
../../lib/protomatter/arch.h:1114:3: error: incompatible implicit declaration of built-in function 'memset' [-Werror]
../../lib/protomatter/arch.h:147:1: note: include '<string.h>' or provide a declaration of 'memset'

However, the real fix is to include in arch.h any header that MUST have its
declarations visible for the header to be self-supporting; do so.
2020-05-07 18:28:55 -05:00
Phillip Burgess
a51676db5e clang-format the lot 2020-04-30 15:30:24 -07:00
Phillip Burgess
40cb6a9cac Use TC3 on SAMD's that lack a TC4 2020-04-30 15:18:18 -07:00
Phillip Burgess
8968259c14 Doxygenate 2020-04-30 13:53:15 -07:00
1b8f461f64 Port to STM32F405, other stm-series micros likely to follow
Testing performed: With the STM32F405 Feather, all expected pins waggle
on a logic probe.  I didn't hook up an actual matrix yet.
2020-04-30 08:55:53 -05:00
241bf2516c circuitpython: fix nRF, samd byte/word offset macros
Before, these would only work properly with pins from the first
GPIO bank.
2020-04-30 08:55:53 -05:00
41a92d7731 Allow GPIO registers to have a size _other than_ 32 bits, for stm32
stm32's GPIO set/clear registers are effectively 16 bits big,
unlike other platforms encountered so far.

Introduce macros to set/clear registers, and use them.

Later, stm32 will introduce its own definition of the _PM_PORT_TYPE macro
as uint16_t.

Testing performed: compile-tested on nRF.
2020-04-30 08:55:53 -05:00
c411714cbd circuitpython: nrf port 2020-04-01 11:57:16 -05:00
c3a3e35731 Factor out _PM_convert_565, _PM_swapbuffer_maybe 2020-03-20 10:12:32 -05:00
7f448357d0 Merge remote-tracking branch 'origin/master' into circuitpython 2020-03-20 10:04:21 -05:00
969672dff1 Adapt to CircuitPython / samd51 2020-03-20 10:02:57 -05:00
Phillip Burgess
e1659f270c nRF52840 tested and WORKING 2020-03-17 17:36:46 -07:00
Phillip Burgess
20c3b67bc3 nRF52 seems to work with some caveats
Plane-zero interval is hardcoded for now. Haven’t connected to matrix yet, just looking on scope.
2020-03-17 15:18:52 -07:00
Phillip Burgess
103ea89935 nRF52: timer oopsie + pin sudoku 2020-03-17 13:12:13 -07:00
Phillip Burgess
51f39d9594 More nRF fiddling (not yet working) 2020-03-17 12:33:12 -07:00
Phillip Burgess
97c2122ba7 nRF timer almost starting to semi-work 2020-03-16 22:31:33 -07:00
Phillip Burgess
831a253898 nRF, initial GPIO stuff, very WIP 2020-03-16 15:49:58 -07:00
Phillip Burgess
ffc2ec1d02 Handle word & long PORT bit arrangements, parallel matrices 2020-03-13 17:58:57 -07:00
Phillip Burgess
20d8bc80b6 Add notes, tweak doublebuffer example, move convert565 to arch.h 2020-03-05 22:14:54 -08:00
Phillip Burgess
36ff73e2e6 Some Arduino progress! 2020-03-04 14:07:56 -08:00
Phillip Burgess
1cb7eee459 Some documentation and Arduino WIP 2020-03-04 09:15:59 -08:00
Phillip Burgess
fc41d776f7 Compiles but probably not working yet 2020-03-03 22:52:45 -08:00
Phillip Burgess
7a2f65aaf6 Speed up row addr selection, add doublebuffer example 2020-02-25 18:14:54 -08:00
Phillip Burgess
dd414bbcc8 Fix double-buffering and bit 0 speed folly 2020-02-25 10:51:17 -08:00
Phillip Burgess
ddbb8847f0 Fix up convert func, bit 0 timing, SAMD51 overclock 2020-02-24 22:18:45 -08:00
Phillip Burgess
a41b6c27ae Incremental tweaks 2020-02-24 18:18:04 -08:00
Phillip Burgess
396c5114fb SAMD51 looking OK on 'scope 2020-02-24 14:14:44 -08:00
Phillip Burgess
8346bd8c4d Looking OK on scope (SAMD21), need to wire up now… 2020-02-24 12:48:41 -08:00
Phillip Burgess
233448cd8b Initial commit (still WIP)
Still some work to do but at least it's not crashing now.
2020-02-21 21:22:52 -08:00