diff options
| author | arturo182 <arturo182@tlen.pl> | 2018-06-27 20:14:25 +0200 |
|---|---|---|
| committer | arturo182 <arturo182@tlen.pl> | 2018-06-27 20:55:29 +0200 |
| commit | b87bba8a286bd57fe1d9f3bfe2aec5adb2137780 (patch) | |
| tree | 8fbce1891c7c90a36bcc6e2e2b0e1bb9db321e26 /ports/nrf/common-hal/microcontroller | |
| parent | 91427b0b2366a792e165b48e81453d0cf98e1fb9 (diff) | |
nrf: Rewrite more common-hal with nrfx and sync with atsamd port
Diffstat (limited to 'ports/nrf/common-hal/microcontroller')
| -rw-r--r-- | ports/nrf/common-hal/microcontroller/__init__.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ports/nrf/common-hal/microcontroller/__init__.c b/ports/nrf/common-hal/microcontroller/__init__.c index e26acff1b..b63ee5a88 100644 --- a/ports/nrf/common-hal/microcontroller/__init__.c +++ b/ports/nrf/common-hal/microcontroller/__init__.c @@ -27,14 +27,15 @@ #include "common-hal/microcontroller/Pin.h" #include "common-hal/microcontroller/Processor.h" - #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Processor.h" -// TODO porting common_hal_mcu +#include "supervisor/filesystem.h" +#include "nrfx_glue.h" + void common_hal_mcu_delay_us(uint32_t delay) { -// os_delay_us(delay); + NRFX_DELAY_US(delay); } void common_hal_mcu_disable_interrupts() { @@ -48,7 +49,8 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { } void common_hal_mcu_reset(void) { - // TODO: see atmel-samd for functionality + filesystem_flush(); + NVIC_SystemReset(); } // The singleton microcontroller.Processor object, bound to microcontroller.cpu |
