-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Nrf52 merge #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nrf52 merge #369
Conversation
…nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now.
…s a bug in transfer of bytes due to casting errors. The update removes the pyb_spi_obj_t wrapper going directly on the machine_hard_spi_obj_t as base for machine SPI objects. SDCard mounting is also tested.
…orward compatible with upstream master. Legacy high() and low() methods are kept.
…cting typo and adding SD card wireing documentation for direct SPI connection.
…instead of legacy Framebuffer1.
…ed in the seeed_tft.py ILI9341 driver for driving the display.
…y to do client write with response. Blocking call.
… an additional keyword, 'with_response'. Default value is False. Only activated in central role.
…all to bluetooth stack write function is done, to make sure that its not overwritten after reception of the write event in case of with_response writes.
…HAL driver. To make api's symetric. Also updating modules/rtc to get aligned with new HAL api.
…ore initializing RTC instance.
…erbose. Using 1 second interval ticks.
…s.c used by BLE 6lowpan network which has been removed for now.
…nside to get to millisecond resolution. Callback must be registered before starting a timer.
…w parameters to the init to set period, mode and callback.
…iled in. Leaving timer1 and timer2 for application. Note that music module soft-pwm will also occupy timer1 if enabled.
…figure the irq_priority.
…efore initializing Timer instance.
…ide whether to use MUSIC_PIN define or throw an error. If MUSIC_PIN define is configured the pin argument to music module play() can be elided.
…from mpconfigboard.h if set, in the case of lacking kwarg for pin. Also removing some commented out arguments to remove some confusion in the argument list. Done for both play() and pitch().
Printing "(null)" when a NULL string pointer is passed to %s is a debugging feature and not a feature that's relied upon by the code. So it only needs to be compiled in when debugging (such as assert) is enabled, and saves roughy 30 bytes of code when disabled. This patch also fixes this NULL check to not do the check if the precision is specified as zero.
Duplicating pattern for detecting location of libm, libc and libgcc from teensy port. Activating MICROPY_FLOAT_IMPL (FLOAT) for nrf52 targets and adding libs into the compile. For nrf51 targets it is still set to NONE as code grows to much (about 30k). Some numbers on flash use if MICROPY_FLOAT_IMPL is set to MICROPY_FLOAT_IMPL_FLOAT and math libraries are enabled (lgcc, lc, lm). nrf51: ====== without float support: text data bss dec hex filename 144088 260 30020 174368 2a920 build-pca10028/firmware.elf with float support: text data bss dec hex filename 176228 1336 30020 207584 32ae0 build-pca10028/firmware.elf nrf52: ====== without float support: text data bss dec hex filename 142040 356 36236 178632 2b9c8 build-pca10040/firmware.elf with float support: text data bss dec hex filename 165068 1436 36236 202740 317f4 build-pca10040/firmware.elf
* nrf: Adding Arduino Primo board support * nrf: Adding arduino_primo to target boards table in readme.md * nrf/boards: Activating pyb.LED module for arduino_primo board. * nrf/boards: Removing define not needed for arduino_primo Updating arduino_primo board mpconfigboard.h. Removing a define that was wrongly named. Instead of renaming it, it was removed as it was never used.
The driver also takes care of calling the Bluetooth LE stack for random values if the stack is enabled. The reason for this is that the Bluetooth LE stack take ownership of the NRF_RNG when enabled. Tolerate to enable/disable on the fly, and will choose to use direct access to the peripheral if Bluetooth LE stack is disabled or not compiled in at all. Driver has been included in the top Makefile, and will not be compiled in unless nrf51_hal_conf.h/nrf52_hal_conf.h defines HAL_RNG_MODULE_ENABLED (1).
Backport of micro:bit random module. Plugged into the port as a general random module for all nrf51/nrf52 targets. Works both with and without Bluetooth LE stack enabled. Behavioral change: seed() method has been removed, as the use of RNG peripheral generates true random sequences and not pseudo-random sequences.
…_msg(&mp_type_ValueError, ...)
…pmerge with upstream master.
This saves about 6-7kB.
This saves about 17kB.
This is prep for merging in the NRF5 pull request.
@@ -177,24 +177,24 @@ CircuitPython: | |||
Ports include the code unique to a microcontroller line and also | |||
variations based on the board. | |||
|
|||
* `atmel-samd` Support for SAMD21 based boards such as [Arduino Zero][], | |||
* `ports/atmel-samd` Support for SAMD21 based boards such as [Arduino Zero][], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't have to be now, but this can mention SAMD51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Massive but the part that needed review is small. Looks good! If we have any nlr_
exception raising in our code we should fix it, but doesn't need to be now.
First step for #291