From 8bfdaa89b9e0e9770133af641c0f2600cff69bae Mon Sep 17 00:00:00 2001 From: arturo182 Date: Wed, 7 Feb 2018 20:53:32 +0100 Subject: [PATCH] nrf: Remove SAMD mentions carried over while copying files --- .../boards/nrf52832_512k_64k_s132_3.0.0.ld | 27 ------------------- ports/nrf/common-hal/pulseio/PWMOut.h | 6 ++--- ports/nrf/common-hal/pulseio/PulseIn.c | 9 +------ ports/nrf/common-hal/pulseio/PulseIn.h | 6 ++--- ports/nrf/common-hal/pulseio/PulseOut.c | 5 +--- ports/nrf/common-hal/pulseio/PulseOut.h | 6 ++--- ports/nrf/internal_flash.c | 7 ----- ports/nrf/internal_flash.h | 6 ++--- 8 files changed, 14 insertions(+), 58 deletions(-) delete mode 100644 ports/nrf/boards/nrf52832_512k_64k_s132_3.0.0.ld diff --git a/ports/nrf/boards/nrf52832_512k_64k_s132_3.0.0.ld b/ports/nrf/boards/nrf52832_512k_64k_s132_3.0.0.ld deleted file mode 100644 index 159c159b2c..0000000000 --- a/ports/nrf/boards/nrf52832_512k_64k_s132_3.0.0.ld +++ /dev/null @@ -1,27 +0,0 @@ -/* - GNU linker script for NRF52 w/ s132 3.0.0 SoftDevice -*/ - -/* Specify the memory areas */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x080000 /* entire flash, 512 KiB */ - FLASH_ISR (rx) : ORIGIN = 0x0001f000, LENGTH = 0x001000 /* sector 0, 4 KiB */ - FLASH_TEXT (rx) : ORIGIN = 0x00020000, LENGTH = 0x060000 /* 396 KiB */ - RAM (xrw) : ORIGIN = 0x200039c0, LENGTH = 0x0c640 /* 49.5 KiB, give 8KiB headroom for softdevice */ -} - -/* produce a link error if there is not this amount of RAM for these sections */ -_minimum_stack_size = 2K; -_minimum_heap_size = 16K; - -/* top end of the stack */ - -/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ -_estack = ORIGIN(RAM) + LENGTH(RAM); - -/* RAM extents for the garbage collector */ -_ram_end = ORIGIN(RAM) + LENGTH(RAM); -_heap_end = 0x20007000; /* tunable */ - -INCLUDE "boards/common.ld" diff --git a/ports/nrf/common-hal/pulseio/PWMOut.h b/ports/nrf/common-hal/pulseio/PWMOut.h index ddb7192a88..9de127ac7b 100644 --- a/ports/nrf/common-hal/pulseio/PWMOut.h +++ b/ports/nrf/common-hal/pulseio/PWMOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PWMOUT_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PWMOUT_H #include "common-hal/microcontroller/Pin.h" @@ -44,4 +44,4 @@ typedef struct { void pwmout_reset(void); -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H +#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PWMOUT_H diff --git a/ports/nrf/common-hal/pulseio/PulseIn.c b/ports/nrf/common-hal/pulseio/PulseIn.c index a6f1bf10d6..aa6bb8665b 100644 --- a/ports/nrf/common-hal/pulseio/PulseIn.c +++ b/ports/nrf/common-hal/pulseio/PulseIn.c @@ -28,20 +28,13 @@ #include -//#include "asf/common2/services/delay/delay.h" -//#include "asf/sam0/drivers/extint/extint.h" -//#include "asf/sam0/drivers/extint/extint_callback.h" -//#include "asf/sam0/drivers/port/port.h" - #include "mpconfigport.h" #include "py/gc.h" #include "py/runtime.h" -//#include "samd21_pins.h" + #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/pulseio/PulseIn.h" -//#include "tick.h" - void pulsein_reset(void) { } diff --git a/ports/nrf/common-hal/pulseio/PulseIn.h b/ports/nrf/common-hal/pulseio/PulseIn.h index f577a61311..666f5a1648 100644 --- a/ports/nrf/common-hal/pulseio/PulseIn.h +++ b/ports/nrf/common-hal/pulseio/PulseIn.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PULSEIN_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PULSEIN_H #include "common-hal/microcontroller/Pin.h" @@ -46,4 +46,4 @@ typedef struct { void pulsein_reset(void); -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H +#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PULSEIN_H diff --git a/ports/nrf/common-hal/pulseio/PulseOut.c b/ports/nrf/common-hal/pulseio/PulseOut.c index dbeaf6b07a..3495f38f7d 100644 --- a/ports/nrf/common-hal/pulseio/PulseOut.c +++ b/ports/nrf/common-hal/pulseio/PulseOut.c @@ -28,13 +28,10 @@ #include -//#include "asf/sam0/drivers/tc/tc_interrupt.h" -//#include "asf/sam0/drivers/port/port.h" - #include "mpconfigport.h" #include "py/gc.h" #include "py/runtime.h" -//#include "samd21_pins.h" + #include "shared-bindings/pulseio/PulseOut.h" //void pulse_finish(struct tc_module *const module) { diff --git a/ports/nrf/common-hal/pulseio/PulseOut.h b/ports/nrf/common-hal/pulseio/PulseOut.h index 8ade95cd6d..9a764e3023 100644 --- a/ports/nrf/common-hal/pulseio/PulseOut.h +++ b/ports/nrf/common-hal/pulseio/PulseOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PULSEOUT_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PULSEOUT_H #include "common-hal/microcontroller/Pin.h" @@ -39,4 +39,4 @@ typedef struct { void pulseout_reset(void); -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H +#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PULSEOUT_H diff --git a/ports/nrf/internal_flash.c b/ports/nrf/internal_flash.c index 1681dc1c40..9df1051461 100644 --- a/ports/nrf/internal_flash.c +++ b/ports/nrf/internal_flash.c @@ -56,13 +56,6 @@ void internal_flash_init(void) { port_pin_set_config(MICROPY_HW_LED_MSC, &pin_conf); port_pin_set_output_level(MICROPY_HW_LED_MSC, false); #endif - - #ifdef SAMD51 - hri_mclk_set_AHBMASK_NVMCTRL_bit(MCLK); - #endif - #ifdef SAMD21 - _pm_enable_bus_clock(PM_BUS_APBB, NVMCTRL); - #endif // flash_init(&internal_flash_desc, NVMCTRL); } diff --git a/ports/nrf/internal_flash.h b/ports/nrf/internal_flash.h index db41065fe5..79b786555f 100644 --- a/ports/nrf/internal_flash.h +++ b/ports/nrf/internal_flash.h @@ -23,8 +23,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H -#define MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H +#ifndef MICROPY_INCLUDED_NRF_INTERNAL_FLASH_H +#define MICROPY_INCLUDED_NRF_INTERNAL_FLASH_H #include #include @@ -58,4 +58,4 @@ struct _fs_user_mount_t; void flash_init_vfs(struct _fs_user_mount_t *vfs); void flash_flush(void); -#endif // MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H +#endif // MICROPY_INCLUDED_NRF_INTERNAL_FLASH_H