diff --git a/ion/src/device/n0110/Makefile b/ion/src/device/n0110/Makefile new file mode 100644 index 000000000..deb82dc23 --- /dev/null +++ b/ion/src/device/n0110/Makefile @@ -0,0 +1,9 @@ +ion_device_src += $(addprefix ion/src/device/n0110/drivers/, \ + board.cpp \ + cache.cpp \ + power.cpp \ +) + +ion_device_src += ion/src/device/n0110/usb/stack/device.cpp + +LDSCRIPT ?= ion/src/device/n0110/flash.ld diff --git a/ion/src/device/n0200/drivers/board.cpp b/ion/src/device/n0110/drivers/board.cpp similarity index 99% rename from ion/src/device/n0200/drivers/board.cpp rename to ion/src/device/n0110/drivers/board.cpp index f370dad03..e27b3965b 100644 --- a/ion/src/device/n0200/drivers/board.cpp +++ b/ion/src/device/n0110/drivers/board.cpp @@ -10,7 +10,7 @@ extern void * InitialisationVector; // Public Ion methods const char * Ion::fccId() { - return "2ALWP-N0200"; + return "2ALWP-N0110"; } // Private Ion::Device methods diff --git a/ion/src/device/n0200/drivers/cache.cpp b/ion/src/device/n0110/drivers/cache.cpp similarity index 100% rename from ion/src/device/n0200/drivers/cache.cpp rename to ion/src/device/n0110/drivers/cache.cpp diff --git a/ion/src/device/n0200/drivers/cache.h b/ion/src/device/n0110/drivers/cache.h similarity index 93% rename from ion/src/device/n0200/drivers/cache.h rename to ion/src/device/n0110/drivers/cache.h index 41f1ca2c0..cc047743b 100644 --- a/ion/src/device/n0200/drivers/cache.h +++ b/ion/src/device/n0110/drivers/cache.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CACHE_H -#define ION_DEVICE_N0200_CACHE_H +#ifndef ION_DEVICE_N0110_CACHE_H +#define ION_DEVICE_N0110_CACHE_H #include diff --git a/ion/src/device/n0200/drivers/config/backlight.h b/ion/src/device/n0110/drivers/config/backlight.h similarity index 81% rename from ion/src/device/n0200/drivers/config/backlight.h rename to ion/src/device/n0110/drivers/config/backlight.h index 3675bcd75..6f9483869 100644 --- a/ion/src/device/n0200/drivers/config/backlight.h +++ b/ion/src/device/n0110/drivers/config/backlight.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_BACKLIGHT_H -#define ION_DEVICE_N0200_CONFIG_BACKLIGHT_H +#ifndef ION_DEVICE_N0110_CONFIG_BACKLIGHT_H +#define ION_DEVICE_N0110_CONFIG_BACKLIGHT_H #include diff --git a/ion/src/device/n0200/drivers/config/battery.h b/ion/src/device/n0110/drivers/config/battery.h similarity index 88% rename from ion/src/device/n0200/drivers/config/battery.h rename to ion/src/device/n0110/drivers/config/battery.h index 4475c1053..07851149b 100644 --- a/ion/src/device/n0200/drivers/config/battery.h +++ b/ion/src/device/n0110/drivers/config/battery.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_BATTERY_H -#define ION_DEVICE_N0200_CONFIG_BATTERY_H +#ifndef ION_DEVICE_N0110_CONFIG_BATTERY_H +#define ION_DEVICE_N0110_CONFIG_BATTERY_H #include diff --git a/ion/src/device/n0200/drivers/config/clocks.h b/ion/src/device/n0110/drivers/config/clocks.h similarity index 96% rename from ion/src/device/n0200/drivers/config/clocks.h rename to ion/src/device/n0110/drivers/config/clocks.h index 3c77b22d1..1c56c0277 100644 --- a/ion/src/device/n0200/drivers/config/clocks.h +++ b/ion/src/device/n0110/drivers/config/clocks.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_CLOCKS_H -#define ION_DEVICE_N0200_CONFIG_CLOCKS_H +#ifndef ION_DEVICE_N0110_CONFIG_CLOCKS_H +#define ION_DEVICE_N0110_CONFIG_CLOCKS_H #include diff --git a/ion/src/device/n0200/drivers/config/console.h b/ion/src/device/n0110/drivers/config/console.h similarity index 90% rename from ion/src/device/n0200/drivers/config/console.h rename to ion/src/device/n0110/drivers/config/console.h index 5120971f2..58a527201 100644 --- a/ion/src/device/n0200/drivers/config/console.h +++ b/ion/src/device/n0110/drivers/config/console.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_CONSOLE_H -#define ION_DEVICE_N0200_CONFIG_CONSOLE_H +#ifndef ION_DEVICE_N0110_CONFIG_CONSOLE_H +#define ION_DEVICE_N0110_CONFIG_CONSOLE_H #include diff --git a/ion/src/device/n0200/drivers/config/display.h b/ion/src/device/n0110/drivers/config/display.h similarity index 92% rename from ion/src/device/n0200/drivers/config/display.h rename to ion/src/device/n0110/drivers/config/display.h index 539e91294..c14f0d21b 100644 --- a/ion/src/device/n0200/drivers/config/display.h +++ b/ion/src/device/n0110/drivers/config/display.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_DISPLAY_H -#define ION_DEVICE_N0200_CONFIG_DISPLAY_H +#ifndef ION_DEVICE_N0110_CONFIG_DISPLAY_H +#define ION_DEVICE_N0110_CONFIG_DISPLAY_H #include diff --git a/ion/src/device/n0200/drivers/config/external_flash.h b/ion/src/device/n0110/drivers/config/external_flash.h similarity index 94% rename from ion/src/device/n0200/drivers/config/external_flash.h rename to ion/src/device/n0110/drivers/config/external_flash.h index f99f2ab34..8b83ff1d1 100644 --- a/ion/src/device/n0200/drivers/config/external_flash.h +++ b/ion/src/device/n0110/drivers/config/external_flash.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_EXTERNAL_FLASH_H -#define ION_DEVICE_N0200_CONFIG_EXTERNAL_FLASH_H +#ifndef ION_DEVICE_N0110_CONFIG_EXTERNAL_FLASH_H +#define ION_DEVICE_N0110_CONFIG_EXTERNAL_FLASH_H #include diff --git a/ion/src/device/n0200/drivers/config/flash.h b/ion/src/device/n0110/drivers/config/flash.h similarity index 83% rename from ion/src/device/n0200/drivers/config/flash.h rename to ion/src/device/n0110/drivers/config/flash.h index 0d263029d..2c50a8fcf 100644 --- a/ion/src/device/n0200/drivers/config/flash.h +++ b/ion/src/device/n0110/drivers/config/flash.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_FLASH_H -#define ION_DEVICE_N0200_CONFIG_FLASH_H +#ifndef ION_DEVICE_N0110_CONFIG_FLASH_H +#define ION_DEVICE_N0110_CONFIG_FLASH_H #include diff --git a/ion/src/device/n0200/drivers/config/keyboard.h b/ion/src/device/n0110/drivers/config/keyboard.h similarity index 96% rename from ion/src/device/n0200/drivers/config/keyboard.h rename to ion/src/device/n0110/drivers/config/keyboard.h index 0eebf666d..2c98f84a3 100644 --- a/ion/src/device/n0200/drivers/config/keyboard.h +++ b/ion/src/device/n0110/drivers/config/keyboard.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_KEYBOARD_H -#define ION_DEVICE_N0200_CONFIG_KEYBOARD_H +#ifndef ION_DEVICE_N0110_CONFIG_KEYBOARD_H +#define ION_DEVICE_N0110_CONFIG_KEYBOARD_H #include #include diff --git a/ion/src/device/n0200/drivers/config/led.h b/ion/src/device/n0110/drivers/config/led.h similarity index 89% rename from ion/src/device/n0200/drivers/config/led.h rename to ion/src/device/n0110/drivers/config/led.h index b69b59ca4..2b76f6318 100644 --- a/ion/src/device/n0200/drivers/config/led.h +++ b/ion/src/device/n0110/drivers/config/led.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_LED_H -#define ION_DEVICE_N0200_CONFIG_LED_H +#ifndef ION_DEVICE_N0110_CONFIG_LED_H +#define ION_DEVICE_N0110_CONFIG_LED_H #include diff --git a/ion/src/device/n0200/drivers/config/serial_number.h b/ion/src/device/n0110/drivers/config/serial_number.h similarity index 64% rename from ion/src/device/n0200/drivers/config/serial_number.h rename to ion/src/device/n0110/drivers/config/serial_number.h index 6118d2b10..c5ad127c3 100644 --- a/ion/src/device/n0200/drivers/config/serial_number.h +++ b/ion/src/device/n0110/drivers/config/serial_number.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_SERIAL_NUMBER_H -#define ION_DEVICE_N0200_CONFIG_SERIAL_NUMBER_H +#ifndef ION_DEVICE_N0110_CONFIG_SERIAL_NUMBER_H +#define ION_DEVICE_N0110_CONFIG_SERIAL_NUMBER_H #include diff --git a/ion/src/device/n0200/drivers/config/swd.h b/ion/src/device/n0110/drivers/config/swd.h similarity index 87% rename from ion/src/device/n0200/drivers/config/swd.h rename to ion/src/device/n0110/drivers/config/swd.h index acfb1ca2e..1b9fcaa20 100644 --- a/ion/src/device/n0200/drivers/config/swd.h +++ b/ion/src/device/n0110/drivers/config/swd.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_SWD_H -#define ION_DEVICE_N0200_CONFIG_SWD_H +#ifndef ION_DEVICE_N0110_CONFIG_SWD_H +#define ION_DEVICE_N0110_CONFIG_SWD_H #include diff --git a/ion/src/device/n0200/drivers/config/timing.h b/ion/src/device/n0110/drivers/config/timing.h similarity index 83% rename from ion/src/device/n0200/drivers/config/timing.h rename to ion/src/device/n0110/drivers/config/timing.h index 6992dddfe..9cdb6b14d 100644 --- a/ion/src/device/n0200/drivers/config/timing.h +++ b/ion/src/device/n0110/drivers/config/timing.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_TIMING_H -#define ION_DEVICE_N0200_CONFIG_TIMING_H +#ifndef ION_DEVICE_N0110_CONFIG_TIMING_H +#define ION_DEVICE_N0110_CONFIG_TIMING_H #include diff --git a/ion/src/device/n0200/drivers/config/usb.h b/ion/src/device/n0110/drivers/config/usb.h similarity index 90% rename from ion/src/device/n0200/drivers/config/usb.h rename to ion/src/device/n0110/drivers/config/usb.h index 653b7dc89..7eea99031 100644 --- a/ion/src/device/n0200/drivers/config/usb.h +++ b/ion/src/device/n0110/drivers/config/usb.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_CONFIG_USB_H -#define ION_DEVICE_N0200_CONFIG_USB_H +#ifndef ION_DEVICE_N0110_CONFIG_USB_H +#define ION_DEVICE_N0110_CONFIG_USB_H #include diff --git a/ion/src/device/n0200/drivers/power.cpp b/ion/src/device/n0110/drivers/power.cpp similarity index 100% rename from ion/src/device/n0200/drivers/power.cpp rename to ion/src/device/n0110/drivers/power.cpp diff --git a/ion/src/device/n0200/flash.ld b/ion/src/device/n0110/flash.ld similarity index 100% rename from ion/src/device/n0200/flash.ld rename to ion/src/device/n0110/flash.ld diff --git a/ion/src/device/n0200/internal_flash.ld b/ion/src/device/n0110/internal_flash.ld similarity index 100% rename from ion/src/device/n0200/internal_flash.ld rename to ion/src/device/n0110/internal_flash.ld diff --git a/ion/src/device/n0200/ram.ld b/ion/src/device/n0110/ram.ld similarity index 100% rename from ion/src/device/n0200/ram.ld rename to ion/src/device/n0110/ram.ld diff --git a/ion/src/device/n0110/regs/config/cortex.h b/ion/src/device/n0110/regs/config/cortex.h new file mode 100644 index 000000000..faee2a9ce --- /dev/null +++ b/ion/src/device/n0110/regs/config/cortex.h @@ -0,0 +1,6 @@ +#ifndef ION_DEVICE_N0110_REGS_CONFIG_CORTEX_H +#define ION_DEVICE_N0110_REGS_CONFIG_CORTEX_H + +#define REGS_CORTEX_CONFIG_CACHE 1 + +#endif diff --git a/ion/src/device/n0110/regs/config/flash.h b/ion/src/device/n0110/regs/config/flash.h new file mode 100644 index 000000000..770fcc37a --- /dev/null +++ b/ion/src/device/n0110/regs/config/flash.h @@ -0,0 +1,6 @@ +#ifndef ION_DEVICE_N0110_REGS_CONFIG_FLASH_H +#define ION_DEVICE_N0110_REGS_CONFIG_FLASH_H + +#define REGS_FLASH_CONFIG_ART 1 + +#endif diff --git a/ion/src/device/n0110/regs/config/pwr.h b/ion/src/device/n0110/regs/config/pwr.h new file mode 100644 index 000000000..85f7c0e9d --- /dev/null +++ b/ion/src/device/n0110/regs/config/pwr.h @@ -0,0 +1,6 @@ +#ifndef ION_DEVICE_N0110_REGS_CONFIG_PWR_H +#define ION_DEVICE_N0110_REGS_CONFIG_PWR_H + +#define REGS_PWR_CONFIG_ADDITIONAL_FIELDS 1 + +#endif diff --git a/ion/src/device/n0110/regs/config/rcc.h b/ion/src/device/n0110/regs/config/rcc.h new file mode 100644 index 000000000..54db5f211 --- /dev/null +++ b/ion/src/device/n0110/regs/config/rcc.h @@ -0,0 +1,7 @@ +#ifndef ION_DEVICE_N0110_REGS_CONFIG_RCC_H +#define ION_DEVICE_N0110_REGS_CONFIG_RCC_H + +#define REGS_RCC_CONFIG_F730 1 +#define REGS_RCC_CONFIG_F412 0 + +#endif diff --git a/ion/src/device/n0110/regs/config/syscfg.h b/ion/src/device/n0110/regs/config/syscfg.h new file mode 100644 index 000000000..1165be7c9 --- /dev/null +++ b/ion/src/device/n0110/regs/config/syscfg.h @@ -0,0 +1,6 @@ +#ifndef ION_DEVICE_N0110_REGS_CONFIG_SYSCFG_H +#define ION_DEVICE_N0110_REGS_CONFIG_SYSCFG_H + +#define REGS_SYSCFG_CONFIG_F412 0 + +#endif diff --git a/ion/src/device/n0200/regs/config/usart.h b/ion/src/device/n0110/regs/config/usart.h similarity index 70% rename from ion/src/device/n0200/regs/config/usart.h rename to ion/src/device/n0110/regs/config/usart.h index 0b116fce1..5de196af2 100644 --- a/ion/src/device/n0200/regs/config/usart.h +++ b/ion/src/device/n0110/regs/config/usart.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0200_REGS_CONFIG_USART_H -#define ION_DEVICE_N0200_REGS_CONFIG_USART_H +#ifndef ION_DEVICE_N0110_REGS_CONFIG_USART_H +#define ION_DEVICE_N0110_REGS_CONFIG_USART_H #define REGS_USART_SR_OFFSET 0x1C #define REGS_USART_RDR_OFFSET 0x24 diff --git a/ion/src/device/n0200/usb/dfu.ld b/ion/src/device/n0110/usb/dfu.ld similarity index 100% rename from ion/src/device/n0200/usb/dfu.ld rename to ion/src/device/n0110/usb/dfu.ld diff --git a/ion/src/device/n0200/usb/stack/device.cpp b/ion/src/device/n0110/usb/stack/device.cpp similarity index 100% rename from ion/src/device/n0200/usb/stack/device.cpp rename to ion/src/device/n0110/usb/stack/device.cpp diff --git a/ion/src/device/n0200/Makefile b/ion/src/device/n0200/Makefile deleted file mode 100644 index 71ddd824b..000000000 --- a/ion/src/device/n0200/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -ion_device_src += $(addprefix ion/src/device/n0200/drivers/, \ - board.cpp \ - cache.cpp \ - power.cpp \ -) - -ion_device_src += ion/src/device/n0200/usb/stack/device.cpp - -LDSCRIPT ?= ion/src/device/n0200/flash.ld diff --git a/ion/src/device/n0200/regs/config/cortex.h b/ion/src/device/n0200/regs/config/cortex.h deleted file mode 100644 index 5536528df..000000000 --- a/ion/src/device/n0200/regs/config/cortex.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0200_REGS_CONFIG_CORTEX_H -#define ION_DEVICE_N0200_REGS_CONFIG_CORTEX_H - -#define REGS_CORTEX_CONFIG_CACHE 1 - -#endif diff --git a/ion/src/device/n0200/regs/config/flash.h b/ion/src/device/n0200/regs/config/flash.h deleted file mode 100644 index 9ba7f7810..000000000 --- a/ion/src/device/n0200/regs/config/flash.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0200_REGS_CONFIG_FLASH_H -#define ION_DEVICE_N0200_REGS_CONFIG_FLASH_H - -#define REGS_FLASH_CONFIG_ART 1 - -#endif diff --git a/ion/src/device/n0200/regs/config/pwr.h b/ion/src/device/n0200/regs/config/pwr.h deleted file mode 100644 index 1f4e6e494..000000000 --- a/ion/src/device/n0200/regs/config/pwr.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0200_REGS_CONFIG_PWR_H -#define ION_DEVICE_N0200_REGS_CONFIG_PWR_H - -#define REGS_PWR_CONFIG_ADDITIONAL_FIELDS 1 - -#endif diff --git a/ion/src/device/n0200/regs/config/rcc.h b/ion/src/device/n0200/regs/config/rcc.h deleted file mode 100644 index 062593f77..000000000 --- a/ion/src/device/n0200/regs/config/rcc.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ION_DEVICE_N0200_REGS_CONFIG_RCC_H -#define ION_DEVICE_N0200_REGS_CONFIG_RCC_H - -#define REGS_RCC_CONFIG_F730 1 -#define REGS_RCC_CONFIG_F412 0 - -#endif diff --git a/ion/src/device/n0200/regs/config/syscfg.h b/ion/src/device/n0200/regs/config/syscfg.h deleted file mode 100644 index 59d52482b..000000000 --- a/ion/src/device/n0200/regs/config/syscfg.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0200_REGS_CONFIG_SYSCFG_H -#define ION_DEVICE_N0200_REGS_CONFIG_SYSCFG_H - -#define REGS_SYSCFG_CONFIG_F412 0 - -#endif diff --git a/ion/src/device/shared/drivers/keyboard.cpp b/ion/src/device/shared/drivers/keyboard.cpp index 0b980dd4c..1e6e5f9a0 100644 --- a/ion/src/device/shared/drivers/keyboard.cpp +++ b/ion/src/device/shared/drivers/keyboard.cpp @@ -3,7 +3,7 @@ * The job of this code is to implement the "ion_key_state" function. * * The keyboard is a matrix that is laid out as follow: - * (K_B2 and K_B3 are respectively specific to N0100 and N0200 + * (K_B2 and K_B3 are respectively specific to N0100 and N0110 * * | PC0 | PC1 | PC2 | PC3 | PC4 | PC5 | * -----+------+------+------+------+------+------+ diff --git a/ion/src/device/shared/drivers/wakeup.cpp b/ion/src/device/shared/drivers/wakeup.cpp index c198dc575..2df251897 100644 --- a/ion/src/device/shared/drivers/wakeup.cpp +++ b/ion/src/device/shared/drivers/wakeup.cpp @@ -20,7 +20,7 @@ void onChargingEvent() { * source input for EXTI at the same time. Here, EXTICR1 register is filled * between: * - N0100: position 0-3 (charging pin = 0) with 0000 (ChargingGPIO = group A) - * - N0200: position 12-15 (charging pin = 3) with 0100 (ChargingGPIO = group E) + * - N0110: position 12-15 (charging pin = 3) with 0100 (ChargingGPIO = group E) */ SYSCFG.EXTICR1()->setEXTI(Battery::Config::ChargingPin.pin(), Battery::Config::ChargingPin.group()); @@ -58,7 +58,7 @@ void onOnOffKeyDown() { /* Here, EXTICR1 register is filled between: * - N0100: position 4-7 (column pin = 1) with 0010 (ColumnGPIO = group C) - * - N0200: position 8-11 (column pin = 2) with 0010 (ColumnGPIO = group C). */ + * - N0110: position 8-11 (column pin = 2) with 0010 (ColumnGPIO = group C). */ SYSCFG.EXTICR1()->setEXTI(columnPin, Keyboard::Config::ColumnGPIO); diff --git a/scripts/device/openocd.n0200.cfg b/scripts/device/openocd.n0110.cfg similarity index 100% rename from scripts/device/openocd.n0200.cfg rename to scripts/device/openocd.n0110.cfg diff --git a/scripts/platform.device.mak b/scripts/platform.device.mak index 9239f6ae3..dc2f70192 100644 --- a/scripts/platform.device.mak +++ b/scripts/platform.device.mak @@ -1,4 +1,4 @@ -MODEL ?= n0200 +MODEL ?= n0110 USE_LIBA = 1 EXE = elf EPSILON_BOOT_PROMPT = update diff --git a/scripts/platform.device.n0200.mak b/scripts/platform.device.n0110.mak similarity index 100% rename from scripts/platform.device.n0200.mak rename to scripts/platform.device.n0110.mak diff --git a/scripts/targets.device.n0200.mak b/scripts/targets.device.n0110.mak similarity index 100% rename from scripts/targets.device.n0200.mak rename to scripts/targets.device.n0110.mak