Commit Graph

959 Commits

Author SHA1 Message Date
Dan Halbert
77cd93ac2d merge from adafruit 2020-04-21 17:47:51 -04:00
Dan Halbert
38ec3bc574 further ringbuf cleanup 2020-04-21 17:38:20 -04:00
Sean Cross
c04e6d6f52 nrf: bleio: parameterize softradio configuration
Allow for setting various softradio memory settings as part of a
board in order to support lower-memory configurations.  If a
parameter is unspecified then the previously-defined value is used.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 12:29:59 +08:00
Sean Cross
3537ad4059 nrf: mpconfigport: support configuration of various sizes
Conditionally set variables such as the softdevice RAM size, bootloader
size, and the spi m3 buffer size.  This allows ports to adjust these
values to suit their needs.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 12:29:58 +08:00
Sean Cross
33720af0c6 nrf: mpconfigport: subtract config size from firmware size
The BLE Config area needs to be subtracted from the size of the firmware.
THis is because the firmware is counted by walking backwards from the end
of memory, and the BLE config area is placed lower in memory than the
firmware.  Subtracting the BLE config size ensures the internal flash
filesystem doesn't try to use the firmware as storage.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 12:29:57 +08:00
Sean Cross
3ed5b87b8f nrf: add support for nrf52833
This adds preliminary support for the nRF52833, which is a variant of
the nRF52840 with half the RAM, half the flash, and fewer peripherals.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 12:29:56 +08:00
Sean Cross
4ad1cbeea3 nrf: make rgbmatrix and framebufferio optional
Ports can set CIRCUITPY_RGBMATRIX and CIRCUITPY_FRAMEBUFFERIO to 0
in their .mk file in order to prevent these from being built.  This
is necessary for resource-constrained devices.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 10:44:21 +08:00
Sean Cross
066f486b28 nrf: supervisor: support building without BUSIO
Only initialize i2c, spi, and uart if building with BUSIO.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 10:44:20 +08:00
Sean Cross
ac9d336f40 nrf: make neopixel support optional
Add a conditional around the call to neopixel_write(), allowing us
to build for nrf without neopixel support.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 09:56:27 +08:00
Scott Shawcroft
bebf27e733
Merge remote-tracking branch 'adafruit/master' into lower_power
This isn't perfect and needs a bit more testing.
2020-04-20 18:25:13 -07:00
Jeff Epler
5fcc6d6286 RGBMatrix: finish renaming from Protomatter
This gets all the purely internal references.  Some uses of
protomatter/Protomatter/PROTOMATTER remain, as they are references
to symbols in the Protomatter C library itself.
2020-04-17 18:44:07 -05:00
Jeff Epler
3d6258f63d Rename Protomatter -> RGBMatrix
This is a quick rename, it changes the user-facing names but not the
internal names of things.
2020-04-17 18:43:57 -05:00
Jeff Epler
a32337718d Rename _protomatter -> protomatter
I originally believed that there would be a wrapper library around it,
like with _pixelbuf; but this proves not to be the case, as there's
too little for the library to do.
2020-04-17 18:43:57 -05:00
Scott Shawcroft
7e3d4c61b5
Update TinyUSB and add interrupt hooks. 2020-04-17 14:16:49 -07:00
Scott Shawcroft
b580b34cbf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-14 17:14:44 -07:00
Jeff Epler
1d8a073c05 nrf: protomatter port 2020-04-14 18:24:58 -05:00
Jeff Epler
09dc46a984 Add Protomatter and FramebufferDisplay 2020-04-14 18:24:54 -05:00
Scott Shawcroft
7e69d30c02
Fix nRF PulseIn 2020-04-03 14:22:56 -07:00
Scott Shawcroft
8fe512c7e9
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-03-31 15:13:58 -07:00
Scott Shawcroft
cbe9512691
Merge pull request #2741 from tannewt/fix_packetbuffer_server
Fix PacketBuffer server support
2020-03-31 13:39:34 -07:00
Jeff Epler
54e8c63b4f
Merge pull request #2730 from tannewt/fix_fourwire_phase_polarity
Add polarity and phase to FourWire.
2020-03-28 07:28:37 -05:00
Scott Shawcroft
798118b74f
Update board.c's to remove remaining tick.h 2020-03-27 14:52:35 -07:00
Scott Shawcroft
b043384949
Update built in display init 2020-03-27 14:35:29 -07:00
siddacious
9e0c00dfd4 adding a backlight polarity flag to Display 2020-03-25 22:51:20 -07:00
siddacious
7bba79363a allowing backlight change 2020-03-25 22:41:23 -07:00
Scott Shawcroft
8a5d3cd6c4
Add exception on small buffer and fix Connecion WRITE handling 2020-03-25 17:41:47 -07:00
Scott Shawcroft
3551b769a2
Fix connection handle tracking in PacketBuffer when a server. 2020-03-25 13:31:18 -07:00
William Moser
c961ed9025 Added 31250 and 56000 to baudrate_map in UART.c, to parallel definitions in nrfx/mdk/nrf*_bitfields.h files 2020-03-24 13:25:02 -04:00
Jeff Epler
d6342af980 ulab: rename enable macro so it appears in the support matrix 2020-03-17 09:33:03 -05:00
Scott Shawcroft
76ca13b6ed
Fix SAMD51 pulsein 2020-03-13 17:21:15 -07:00
Scott Shawcroft
48b5f2a384
Initial work on SAMD 2020-03-13 11:16:41 -07:00
Scott Shawcroft
affd3fcc2a
Clear the pending IRQ in the NVIC as well. 2020-03-13 11:16:38 -07:00
Scott Shawcroft
00d5f63e7c
Hopefully fix PulseIn 2020-03-13 11:12:31 -07:00
Scott Shawcroft
ed5cdd7e09
Hopefully fix flash flush and hopefully audio as well. 2020-03-13 11:12:31 -07:00
Scott Shawcroft
418333979a
Fix autoreload, neopixel, monotonic_ns and sleep w/o SD 2020-03-13 11:12:31 -07:00
Scott Shawcroft
6f60afe8c5
First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
Scott Shawcroft
85f44e20cb
Merge pull request #2695 from TG-Techie/master
Add new TG-Watch02A to the nrf boards directory
2020-03-13 10:46:48 -07:00
TG-Techie
197dc344af fix requested changes 2020-03-12 02:31:13 -04:00
TG-Techie
b967a2071f changed TG-Watch02A HW_BOARD_NAME 2020-03-10 23:07:25 -04:00
TG-Techie
50b451ae0c add TG-Watch02A board def 2020-03-10 22:40:55 -04:00
TG-Techie
fec84054d9 ah 2020-03-06 15:03:37 -05:00
TG-Techie
7198056bc3
Merge pull request #2 from adafruit/5.0.x
5.0.x
2020-03-06 13:57:31 -05:00
Dan Halbert
210c3274e5 Merge remote-tracking branch 'adafruit/master' into assert_pin-and-mp_const_none-cleanup 2020-03-05 17:47:01 -05:00
Jeff Epler
da31acfcc4 Merge remote-tracking branch 'origin/master' into ulab 2020-03-03 20:13:53 -06:00
Dan Halbert
8435935429 update uses of assert_pin_free; remove redundant checks 2020-02-29 15:37:32 -05:00
Dan Halbert
b6206406de new pin validation routines; don't use mp_const_none if NULL will do 2020-02-28 23:43:04 -05:00
Jeff Epler
eef742bf45 oofatfs: Remove _FS_DISK_READ_ALIGNED
This workaround is no longer needed, so it can be removed.

Closes: #2332
2020-02-28 10:04:28 -06:00
Jeff Epler
1e6c08fc30 nrf: sqpi_flash: Handle unaligned reads 2020-02-28 10:03:37 -06:00
TG-Techie
527eb2444c added TG-Watch02A pins 2020-02-28 04:11:54 -05:00
TG-Techie
6d4ffc69fd add TG-Watch02A 2020-02-28 02:52:46 -05:00
Jeff Epler
fa3b9eba92 ulab: Incorporate it 2020-02-27 11:03:03 -06:00
ladyada
86e9fd170a move red LED to D13 and make D3 lsm6ds IRQ 2020-02-25 18:00:23 -05:00
Scott Shawcroft
28c7a1e9c3
Fix crash after empty REPL session
We were trying to reset bluetooth when it was off and then trying
to raise an exception without the heap.
2020-02-24 16:11:17 -08:00
Dan Halbert
f63b2c0d0c use realloc instead 2020-02-21 17:36:15 -05:00
Dan Halbert
9cf46ec947 put neopixel_write buffer in root pointers 2020-02-21 08:44:25 -05:00
Dan Halbert
23d6a3dc1f merge from upstream 2020-02-20 22:27:16 -05:00
Dan Halbert
634d246910 relicense nrf SPI.c to MIT 2020-02-20 16:00:21 -05:00
Dave Marples
24405cabaf Edits as a result of review 2020-02-19 00:07:01 +00:00
Dave Marples
490a808bf6 Addition of stubs for rs485/CTS/RTS handling on non-implemented chips 2020-02-18 23:16:40 +00:00
Dan Halbert
dc97b0d844 correct chec^Cfor flash erase boundaries 2020-02-13 17:41:05 -05:00
Scott Shawcroft
e97b0cfc61
Merge pull request #2581 from jamesbowman/master
First draft of eveL, the low-level module of the Gameduino bindings
2020-02-13 11:21:32 -08:00
Dan Halbert
e00b3269fe use properly-sized SPI transactions 2020-02-12 15:04:19 -05:00
Dan Halbert
2e029d55fc nrf: add SPIM3 support 2020-02-11 19:22:14 -05:00
Drew Fustini
3bf4b42e2e change OH20 badge pin defs to use SWn for buttons
Rather than use A, B, C and D

Use the buttons according to silkscreen references:
SW1
SW2
SW3
SW4
2020-02-10 00:49:13 +01:00
Drew Fustini
0a54f88751 add pin defs for buttons on the OHS2020 badge 2020-02-10 00:32:16 +01:00
Dan Halbert
005c4caf8c fix function defs for compiler 2020-02-07 10:32:37 -05:00
Dan Halbert
857d8ab40a improve time.monotonic_ns() accuracy from ms to us 2020-02-07 10:02:50 -05:00
Dan Halbert
a63f49cb83
Merge pull request #2592 from tannewt/add_extra_ble_error
Add another error message to BLE
2020-02-05 23:39:17 -05:00
James Bowman
acef93a253 Rename eveL to _eve, EVEL to _EVE 2020-02-05 18:17:58 -08:00
Scott Shawcroft
72a1bdab30
Add another error message for extended advertisements at the same
time as scan response. The SD can't do it.
2020-02-05 15:56:17 -08:00
Dan Halbert
b6da2fa173 nrf: fix i2c frequency setting 2020-02-05 11:25:31 -05:00
James Bowman
7fd30e7d20 First draft of eveL, the low-level module of the Gameduino (and BridgeTek EVE) bindings.
[adafruit/circuitpython#2578]
2020-02-03 16:46:14 -08:00
Lady Ada
5a29b222eb add bluefruit sense - tested 2020-02-03 13:52:30 -05:00
Michael Welling
64cafe82bc Adjust OHS2020 madctl for default rotation
Make to go faster I guess.

Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-02-02 22:14:10 -08:00
Michael Welling
6804b2a7fd Add I2C pin definitions for interoperability with Adafruit libraries
Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-02-02 22:13:39 -08:00
Michael Welling
33dcdd7c03 Updates to enable working SPI TFT
The backlight enable is active low on our board so the driver doesn't like it.
Toggling to GPIO manually for now.

As fixed the improper SPI bus pins definitions and it works!

Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-02-02 22:13:03 -08:00
Michael Welling
d99c2ffe4f QSPI flash fixes
We had the pin names swapped on the schematic and a different flash was populated.

Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-02-02 22:11:12 -08:00
Lady Ada
dc964b346c adjust CLUE madctl so rotation 0 is 'right' 2020-01-31 20:17:39 -05:00
Dan Halbert
be4e681d07 fix UICR check; do not use NULL for no MISO 2020-01-31 18:57:41 -05:00
Dan Halbert
4abd5f1f7b increase max connections from 2 to 5 2020-01-31 14:58:23 -05:00
Dan Halbert
b6358182d3 Update CLUE to Rev C 2020-01-30 15:22:26 -05:00
Scott Shawcroft
298bca3fdd
Merge pull request #2562 from dhalbert/ble-fixes
nrf: track vm_used_ble better
2020-01-30 10:33:19 -08:00
Dan Halbert
87f73e2729 track vm_used_ble better 2020-01-30 09:52:06 -05:00
hierophect
898f4e1f72
Merge branch 'master' into stm32-meowbit 2020-01-29 16:32:08 -05:00
Lucian Copeland
100409961a Move board_init to main.c 2020-01-29 16:29:43 -05:00
Wojtek Siudzinski
df5e58fc6e Add support for the Particle Ethernet FeatherWing 2020-01-28 10:53:50 +01:00
Scott Shawcroft
b36b2493bc
Merge pull request #2532 from tannewt/teensy4-dev
Refine iMX RT memory layout and add three boards
2020-01-27 14:11:08 -08:00
Lady Ada
f2dfcee042 add missing displayref 2020-01-26 20:10:20 -05:00
Dan Halbert
68f9aee992 reset NeoPixels on CPB on soft reload 2020-01-23 20:16:31 -05:00
Scott Shawcroft
1c39606345
Fix other builds missing new heap bounds functions 2020-01-18 18:06:56 -08:00
Michael Welling
cc77e86408 Update the VID and USB company string
Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-01-16 15:43:49 -08:00
Michael Welling
cc03d68984 Fix backlight pin registration
Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-01-16 14:53:07 -08:00
Michael Welling
86d454adf3 Initial board support for OHS2020 Badge
Not tested but builds.

Signed-off-by: Michael Welling <mwelling@ieee.org>
2020-01-16 13:46:56 -08:00
Scott Shawcroft
8b61333937
Merge pull request #2510 from dhalbert/bonding-nvm
nrf: Add bonding to BLE pairing support
2020-01-15 16:11:09 -08:00
Benny Meisels
4bf10a75c7 Add board definition files for AramCon Badge 2019 2020-01-16 00:44:18 +02:00
Dan Halbert
85dc4089b9 address review comments 2020-01-14 17:23:16 -05:00
Dan Halbert
0367ba7495 fix some typos and leftovers 2020-01-13 18:29:34 -05:00
Dan Halbert
2a75196aa3 merge from adafruit/circuitpython 2020-01-13 18:15:32 -05:00
Dan Halbert
4ad004f24e put bonding to-do flags into Connection objects instead of using a heap-allocated queue 2020-01-13 17:52:32 -05:00
Dan Halbert
9e7f8743c2 fix CCCD bonding store; avoid excessive bonding writes 2020-01-12 23:32:51 -05:00
Dan Halbert
346ce3b73b wip: HID bonding works! 2020-01-10 23:55:45 -05:00
Scott Shawcroft
6ea8d8a6c2
Merge pull request #2498 from dhalbert/optional-i2c-pullup-checking
Make requiring I2C pullups be optional
2020-01-10 11:42:44 -08:00
Scott Shawcroft
8708d3dc45
Merge pull request #2461 from jepler/urandom-hardfaults
Urandom hardfaults
2020-01-10 11:37:59 -08:00
Dan Halbert
9c167af17a wip; redid flash writing to be compatible with SD 2020-01-09 17:40:02 -05:00
Dan Halbert
189f2d5f07 Make requiring I2C pullups be optional 2020-01-09 17:31:50 -05:00
Jeff Epler
1c6efb9e66 os.urandom: remove unneeded sleep 2020-01-08 16:48:17 -06:00
Roy Hooper
1caf6bd8d3 add missing .h file 2020-01-08 15:23:38 -05:00
Roy Hooper
e1c1e32ceb address code review 2020-01-08 15:17:54 -05:00
Roy Hooper
4e040b0152 add reset of heap to board reset for nrf port 2020-01-08 15:15:27 -05:00
Roy Hooper
34c9e00f08 try (re)using the buffer in neopixel_write 2020-01-08 15:14:53 -05:00
Scott Shawcroft
7a94940c89
Replace magic number and add comment. 2020-01-08 11:01:43 -08:00
Scott Shawcroft
d4492aaed0
Merge remote-tracking branch 'adafruit/master' into packet_buffer 2020-01-08 10:44:37 -08:00
Jeff Epler
b3fb024301 nrf: Call into sd as many times as necessary to fill urandom request
Generating 51200 bytes in one go takes 4.966s, so that's a rate of about
10KiB/s.
2020-01-08 10:06:55 -06:00
Dan Halbert
8d629a957d
Merge pull request #2367 from iot49/mtime
fix mtime on file creation
2020-01-07 17:19:40 -05:00
Dan Halbert
390337b9a5 wip; compiles 2020-01-05 23:33:42 -05:00
Scott Shawcroft
82fb761c0f
Add PacketBuffer and MTU negotiation support.
PacketBuffer facilitates packet oriented BLE protocols such as BLE
MIDI and the Apple Media Service.

This also adds PHY, MTU and connection event extension negotiation
to speed up data transfer when possible.
2020-01-03 17:29:54 -08:00
Scott Shawcroft
776c9b011c
Merge pull request #2432 from tannewt/fix_nrf_uart
Fix nRF UART reset
2020-01-03 16:57:59 -08:00
Scott Shawcroft
f6ec1ea172
Throw an error when we cannot allocate PWM pixel buffer 2020-01-03 15:15:36 -08:00
Scott Shawcroft
6afb8dadbc
Change SPI and I2C in the same way. 2020-01-03 15:14:37 -08:00
Dan Halbert
242d572470 wip 2020-01-03 10:24:07 -05:00
Dan Halbert
f0d34da556 add display support; rotation 270 2019-12-30 17:39:39 -05:00
Dan Halbert
3f9ebd2fed initial CLUE board defn 2019-12-30 17:10:42 -05:00
Scott Shawcroft
cfd71d9023
Fix nRF UART reset
disable only turns off ENABLE but doesn't set the init tracking that
nrfx uses. uninit hangs if ENABLE is off and is called because it
waits forever for TX to stop.
2019-12-27 20:18:07 -08:00
Jeff Epler
51af8aadb7 nrf: PWMAudioOut: 62500Hz limitation is not needed
.. and it gets in the way of some example programs, due to the way
circuitplayground library generates different frequency sine waves
2019-12-19 10:34:56 -06:00
Ha Thach
25df6e613a
Merge pull request #2395 from hathach/nrfx-v2
upgrade nrfx API to v2
2019-12-18 16:14:25 +07:00
hathach
dad2663337 update nrfx submodule to v2 2019-12-18 15:39:11 +07:00
Jeff Epler
8137ac4c49 nRF: PWMAudioOut: handle non-looping rawsamples 2019-12-17 08:59:08 -06:00
hathach
894cad2e17 upgrade nrfx API to v2 2019-12-17 21:39:52 +07:00
JoeBakalor
2abccc1745 update vid and pid for teknikio_bluebird 2019-12-16 08:58:56 -05:00
JoeBakalor
32744a04e1 update bluebird make file 2019-12-13 09:08:21 -05:00
Joe Bakalor
3992a870e5
Merge branch 'master' into teknikio/bluebird 2019-12-13 08:55:15 -05:00
JoeBakalor
4bee6536c9 updates to bluebird 2019-12-13 08:52:03 -05:00
Joe Bakalor
b484c89b73
Merge pull request #4 from adafruit/master
Pull master
2019-12-13 08:51:06 -05:00
Dan Halbert
ef2ef7a6b8 merge from master 2019-12-12 15:51:13 -05:00
Dan Halbert
e11fabd5e0 moved nrf internal filesystem to just below bootloader 2019-12-12 14:57:23 -05:00
Dan Halbert
7889b999cc Fix flash write error handling; clean up safe mode message printing 2019-12-12 14:41:49 -05:00
JoeBakalor
dde7c5e145 Merge branch 'master' of https://github.com/Teknikio/circuitpython 2019-12-12 08:59:37 -05:00
Joe Bakalor
bf4138b0e4
Merge pull request #3 from adafruit/master
Pull master
2019-12-12 08:59:22 -05:00
Dan Halbert
fd03fd5e4f sd_flash_operation_status should be volatile 2019-12-12 00:19:03 -05:00
Dan Halbert
ae64a669dd address review comments 2019-12-11 15:43:06 -05:00
JoeBakalor
0da5dceccf update bluebird makefile 2019-12-11 15:25:16 -05:00
JoeBakalor
a273a7c55e add remaining peripheral pin maps and digital/analog pin definitions 2019-12-11 15:23:16 -05:00
JoeBakalor
006d85d5c2 add make file and board configuration, add accelerometer pin mappings 2019-12-11 14:49:59 -05:00
Dan Halbert
1e11f2708b remove debugging leftovers 2019-12-11 09:34:56 -05:00
iot49
73b6e5d8e6 added correct include files 2019-12-10 19:44:11 -08:00
Dan Halbert
d9ca4c9a60 fix build failures 2019-12-10 22:39:44 -05:00
Dan Halbert
c6221c5956 Remove no-longer-used nrf and atmel-samd .ld files 2019-12-10 21:22:17 -05:00
Dan Halbert
68ae47907c merge from upstream 2019-12-10 21:04:46 -05:00
Dan Halbert
013c840862 working on all ports 2019-12-10 20:27:30 -05:00
Jeff Epler
a484a93b29 nRF: disk_read must be 4-byte aligned
.. a requirement that oofatfs needs to be taught to respect.

This problem can be demonstrated with the following snippet, except
that the related file ("test.bin") must also be contiguous on the
filesystem.  You can ensure this by reformatting your device's filesystem
before testing, then copying any single file bigger than 4kB to test.bin.

    f = open("test.bin", "rb")
    f.seek(2048)
    b = bytearray(2048)
    v = memoryview(b)
    f.readinto(v[909:])

Closes: #2332
2019-12-10 14:03:06 -06:00