diff --git a/ion/src/device/n0101/Makefile b/ion/src/device/n0101/Makefile deleted file mode 100644 index 776d57fad..000000000 --- a/ion/src/device/n0101/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -ion_device_src += $(addprefix ion/src/device/n0101/drivers/, \ - board.cpp \ - cache.cpp \ - power.cpp \ -) - -ion_device_src += ion/src/device/n0101/usb/stack/device.cpp - -LDSCRIPT ?= ion/src/device/n0101/flash.ld diff --git a/ion/src/device/n0101/regs/config/cortex.h b/ion/src/device/n0101/regs/config/cortex.h deleted file mode 100644 index 80e3e0977..000000000 --- a/ion/src/device/n0101/regs/config/cortex.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0101_REGS_CONFIG_CORTEX_H -#define ION_DEVICE_N0101_REGS_CONFIG_CORTEX_H - -#define REGS_CORTEX_CONFIG_CACHE 1 - -#endif diff --git a/ion/src/device/n0101/regs/config/flash.h b/ion/src/device/n0101/regs/config/flash.h deleted file mode 100644 index b0e018fa8..000000000 --- a/ion/src/device/n0101/regs/config/flash.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0101_REGS_CONFIG_FLASH_H -#define ION_DEVICE_N0101_REGS_CONFIG_FLASH_H - -#define REGS_FLASH_CONFIG_ART 1 - -#endif diff --git a/ion/src/device/n0101/regs/config/pwr.h b/ion/src/device/n0101/regs/config/pwr.h deleted file mode 100644 index a904537d9..000000000 --- a/ion/src/device/n0101/regs/config/pwr.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ION_DEVICE_N0101_REGS_CONFIG_PWR_H -#define ION_DEVICE_N0101_REGS_CONFIG_PWR_H - -#define REGS_PWR_CONFIG_ADDITIONAL_FIELDS 1 - -#endif diff --git a/ion/src/device/n0101/regs/config/rcc.h b/ion/src/device/n0101/regs/config/rcc.h deleted file mode 100644 index a5309b636..000000000 --- a/ion/src/device/n0101/regs/config/rcc.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ION_DEVICE_N0101_REGS_CONFIG_RCC_H -#define ION_DEVICE_N0101_REGS_CONFIG_RCC_H - -#define REGS_RCC_CONFIG_F730 1 -#define REGS_RCC_CONFIG_F412 0 - -#endif diff --git a/ion/src/device/n0200/Makefile b/ion/src/device/n0200/Makefile new file mode 100644 index 000000000..71ddd824b --- /dev/null +++ b/ion/src/device/n0200/Makefile @@ -0,0 +1,9 @@ +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/n0101/drivers/board.cpp b/ion/src/device/n0200/drivers/board.cpp similarity index 100% rename from ion/src/device/n0101/drivers/board.cpp rename to ion/src/device/n0200/drivers/board.cpp diff --git a/ion/src/device/n0101/drivers/cache.cpp b/ion/src/device/n0200/drivers/cache.cpp similarity index 100% rename from ion/src/device/n0101/drivers/cache.cpp rename to ion/src/device/n0200/drivers/cache.cpp diff --git a/ion/src/device/n0101/drivers/cache.h b/ion/src/device/n0200/drivers/cache.h similarity index 100% rename from ion/src/device/n0101/drivers/cache.h rename to ion/src/device/n0200/drivers/cache.h diff --git a/ion/src/device/n0101/drivers/config/backlight.h b/ion/src/device/n0200/drivers/config/backlight.h similarity index 81% rename from ion/src/device/n0101/drivers/config/backlight.h rename to ion/src/device/n0200/drivers/config/backlight.h index d01ee7cc2..3675bcd75 100644 --- a/ion/src/device/n0101/drivers/config/backlight.h +++ b/ion/src/device/n0200/drivers/config/backlight.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_BACKLIGHT_H -#define ION_DEVICE_N0101_CONFIG_BACKLIGHT_H +#ifndef ION_DEVICE_N0200_CONFIG_BACKLIGHT_H +#define ION_DEVICE_N0200_CONFIG_BACKLIGHT_H #include diff --git a/ion/src/device/n0101/drivers/config/battery.h b/ion/src/device/n0200/drivers/config/battery.h similarity index 88% rename from ion/src/device/n0101/drivers/config/battery.h rename to ion/src/device/n0200/drivers/config/battery.h index ed0db6b5e..4475c1053 100644 --- a/ion/src/device/n0101/drivers/config/battery.h +++ b/ion/src/device/n0200/drivers/config/battery.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_BATTERY_H -#define ION_DEVICE_N0101_CONFIG_BATTERY_H +#ifndef ION_DEVICE_N0200_CONFIG_BATTERY_H +#define ION_DEVICE_N0200_CONFIG_BATTERY_H #include diff --git a/ion/src/device/n0101/drivers/config/clocks.h b/ion/src/device/n0200/drivers/config/clocks.h similarity index 96% rename from ion/src/device/n0101/drivers/config/clocks.h rename to ion/src/device/n0200/drivers/config/clocks.h index 488f32a72..3c77b22d1 100644 --- a/ion/src/device/n0101/drivers/config/clocks.h +++ b/ion/src/device/n0200/drivers/config/clocks.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_CLOCKS_H -#define ION_DEVICE_N0101_CONFIG_CLOCKS_H +#ifndef ION_DEVICE_N0200_CONFIG_CLOCKS_H +#define ION_DEVICE_N0200_CONFIG_CLOCKS_H #include diff --git a/ion/src/device/n0101/drivers/config/console.h b/ion/src/device/n0200/drivers/config/console.h similarity index 90% rename from ion/src/device/n0101/drivers/config/console.h rename to ion/src/device/n0200/drivers/config/console.h index bbdcd90eb..5120971f2 100644 --- a/ion/src/device/n0101/drivers/config/console.h +++ b/ion/src/device/n0200/drivers/config/console.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_CONSOLE_H -#define ION_DEVICE_N0101_CONFIG_CONSOLE_H +#ifndef ION_DEVICE_N0200_CONFIG_CONSOLE_H +#define ION_DEVICE_N0200_CONFIG_CONSOLE_H #include diff --git a/ion/src/device/n0101/drivers/config/display.h b/ion/src/device/n0200/drivers/config/display.h similarity index 92% rename from ion/src/device/n0101/drivers/config/display.h rename to ion/src/device/n0200/drivers/config/display.h index 397a42da3..539e91294 100644 --- a/ion/src/device/n0101/drivers/config/display.h +++ b/ion/src/device/n0200/drivers/config/display.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_DISPLAY_H -#define ION_DEVICE_N0101_CONFIG_DISPLAY_H +#ifndef ION_DEVICE_N0200_CONFIG_DISPLAY_H +#define ION_DEVICE_N0200_CONFIG_DISPLAY_H #include diff --git a/ion/src/device/n0101/drivers/config/external_flash.h b/ion/src/device/n0200/drivers/config/external_flash.h similarity index 94% rename from ion/src/device/n0101/drivers/config/external_flash.h rename to ion/src/device/n0200/drivers/config/external_flash.h index 737923863..f99f2ab34 100644 --- a/ion/src/device/n0101/drivers/config/external_flash.h +++ b/ion/src/device/n0200/drivers/config/external_flash.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_EXTERNAL_FLASH_H -#define ION_DEVICE_N0101_CONFIG_EXTERNAL_FLASH_H +#ifndef ION_DEVICE_N0200_CONFIG_EXTERNAL_FLASH_H +#define ION_DEVICE_N0200_CONFIG_EXTERNAL_FLASH_H #include diff --git a/ion/src/device/n0101/drivers/config/flash.h b/ion/src/device/n0200/drivers/config/flash.h similarity index 83% rename from ion/src/device/n0101/drivers/config/flash.h rename to ion/src/device/n0200/drivers/config/flash.h index cfd7bbd90..0d263029d 100644 --- a/ion/src/device/n0101/drivers/config/flash.h +++ b/ion/src/device/n0200/drivers/config/flash.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_FLASH_H -#define ION_DEVICE_N0101_CONFIG_FLASH_H +#ifndef ION_DEVICE_N0200_CONFIG_FLASH_H +#define ION_DEVICE_N0200_CONFIG_FLASH_H #include diff --git a/ion/src/device/n0101/drivers/config/keyboard.h b/ion/src/device/n0200/drivers/config/keyboard.h similarity index 96% rename from ion/src/device/n0101/drivers/config/keyboard.h rename to ion/src/device/n0200/drivers/config/keyboard.h index 8037718b5..0eebf666d 100644 --- a/ion/src/device/n0101/drivers/config/keyboard.h +++ b/ion/src/device/n0200/drivers/config/keyboard.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_KEYBOARD_H -#define ION_DEVICE_N0101_CONFIG_KEYBOARD_H +#ifndef ION_DEVICE_N0200_CONFIG_KEYBOARD_H +#define ION_DEVICE_N0200_CONFIG_KEYBOARD_H #include #include diff --git a/ion/src/device/n0101/drivers/config/led.h b/ion/src/device/n0200/drivers/config/led.h similarity index 89% rename from ion/src/device/n0101/drivers/config/led.h rename to ion/src/device/n0200/drivers/config/led.h index 4c5442030..b69b59ca4 100644 --- a/ion/src/device/n0101/drivers/config/led.h +++ b/ion/src/device/n0200/drivers/config/led.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_LED_H -#define ION_DEVICE_N0101_CONFIG_LED_H +#ifndef ION_DEVICE_N0200_CONFIG_LED_H +#define ION_DEVICE_N0200_CONFIG_LED_H #include diff --git a/ion/src/device/n0101/drivers/config/serial_number.h b/ion/src/device/n0200/drivers/config/serial_number.h similarity index 64% rename from ion/src/device/n0101/drivers/config/serial_number.h rename to ion/src/device/n0200/drivers/config/serial_number.h index 7798366de..6118d2b10 100644 --- a/ion/src/device/n0101/drivers/config/serial_number.h +++ b/ion/src/device/n0200/drivers/config/serial_number.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_SERIAL_NUMBER_H -#define ION_DEVICE_N0101_CONFIG_SERIAL_NUMBER_H +#ifndef ION_DEVICE_N0200_CONFIG_SERIAL_NUMBER_H +#define ION_DEVICE_N0200_CONFIG_SERIAL_NUMBER_H #include diff --git a/ion/src/device/n0101/drivers/config/swd.h b/ion/src/device/n0200/drivers/config/swd.h similarity index 87% rename from ion/src/device/n0101/drivers/config/swd.h rename to ion/src/device/n0200/drivers/config/swd.h index aa89b512d..acfb1ca2e 100644 --- a/ion/src/device/n0101/drivers/config/swd.h +++ b/ion/src/device/n0200/drivers/config/swd.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_SWD_H -#define ION_DEVICE_N0101_CONFIG_SWD_H +#ifndef ION_DEVICE_N0200_CONFIG_SWD_H +#define ION_DEVICE_N0200_CONFIG_SWD_H #include diff --git a/ion/src/device/n0101/drivers/config/timing.h b/ion/src/device/n0200/drivers/config/timing.h similarity index 83% rename from ion/src/device/n0101/drivers/config/timing.h rename to ion/src/device/n0200/drivers/config/timing.h index 4eaba832a..6992dddfe 100644 --- a/ion/src/device/n0101/drivers/config/timing.h +++ b/ion/src/device/n0200/drivers/config/timing.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_TIMING_H -#define ION_DEVICE_N0101_CONFIG_TIMING_H +#ifndef ION_DEVICE_N0200_CONFIG_TIMING_H +#define ION_DEVICE_N0200_CONFIG_TIMING_H #include diff --git a/ion/src/device/n0101/drivers/config/usb.h b/ion/src/device/n0200/drivers/config/usb.h similarity index 88% rename from ion/src/device/n0101/drivers/config/usb.h rename to ion/src/device/n0200/drivers/config/usb.h index b2a59b9cf..21ddb4c8e 100644 --- a/ion/src/device/n0101/drivers/config/usb.h +++ b/ion/src/device/n0200/drivers/config/usb.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_CONFIG_USB_H -#define ION_DEVICE_N0101_CONFIG_USB_H +#ifndef ION_DEVICE_N0200_CONFIG_USB_H +#define ION_DEVICE_N0200_CONFIG_USB_H #include diff --git a/ion/src/device/n0101/drivers/power.cpp b/ion/src/device/n0200/drivers/power.cpp similarity index 100% rename from ion/src/device/n0101/drivers/power.cpp rename to ion/src/device/n0200/drivers/power.cpp diff --git a/ion/src/device/n0101/flash.ld b/ion/src/device/n0200/flash.ld similarity index 100% rename from ion/src/device/n0101/flash.ld rename to 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 new file mode 100644 index 000000000..5536528df --- /dev/null +++ b/ion/src/device/n0200/regs/config/cortex.h @@ -0,0 +1,6 @@ +#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 new file mode 100644 index 000000000..9ba7f7810 --- /dev/null +++ b/ion/src/device/n0200/regs/config/flash.h @@ -0,0 +1,6 @@ +#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 new file mode 100644 index 000000000..1f4e6e494 --- /dev/null +++ b/ion/src/device/n0200/regs/config/pwr.h @@ -0,0 +1,6 @@ +#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 new file mode 100644 index 000000000..062593f77 --- /dev/null +++ b/ion/src/device/n0200/regs/config/rcc.h @@ -0,0 +1,7 @@ +#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/n0101/regs/config/usart.h b/ion/src/device/n0200/regs/config/usart.h similarity index 70% rename from ion/src/device/n0101/regs/config/usart.h rename to ion/src/device/n0200/regs/config/usart.h index a7a7442b1..0b116fce1 100644 --- a/ion/src/device/n0101/regs/config/usart.h +++ b/ion/src/device/n0200/regs/config/usart.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_N0101_REGS_CONFIG_USART_H -#define ION_DEVICE_N0101_REGS_CONFIG_USART_H +#ifndef ION_DEVICE_N0200_REGS_CONFIG_USART_H +#define ION_DEVICE_N0200_REGS_CONFIG_USART_H #define REGS_USART_SR_OFFSET 0x1C #define REGS_USART_RDR_OFFSET 0x24 diff --git a/ion/src/device/n0101/usb/stack/device.cpp b/ion/src/device/n0200/usb/stack/device.cpp similarity index 100% rename from ion/src/device/n0101/usb/stack/device.cpp rename to ion/src/device/n0200/usb/stack/device.cpp diff --git a/ion/src/device/shared/drivers/keyboard.cpp b/ion/src/device/shared/drivers/keyboard.cpp index e05094666..0b980dd4c 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 N0101 + * (K_B2 and K_B3 are respectively specific to N0100 and N0200 * * | 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 a20c748d5..c198dc575 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) - * - N0101: position 12-15 (charging pin = 3) with 0100 (ChargingGPIO = group E) + * - N0200: 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) - * - N0101: position 8-11 (column pin = 2) with 0010 (ColumnGPIO = group C). */ + * - N0200: position 8-11 (column pin = 2) with 0010 (ColumnGPIO = group C). */ SYSCFG.EXTICR1()->setEXTI(columnPin, Keyboard::Config::ColumnGPIO); diff --git a/quiz/Makefile b/quiz/Makefile index 4f48ef17a..5afce513f 100644 --- a/quiz/Makefile +++ b/quiz/Makefile @@ -27,7 +27,7 @@ $(BUILD_DIR)/quiz/src/%_symbols.o: SFLAGS += -Iquiz/src $(BUILD_DIR)/test.$(EXE): $(BUILD_DIR)/quiz/src/tests_symbols.o $(runner_objs) $(call object_for,$(tests)) -ifeq ($(MODEL),n0101) +ifeq ($(MODEL),n0200) $(BUILD_DIR)/test_external_flash.$(EXE): LDSCRIPT = ion/test/external_flash_tests.ld $(BUILD_DIR)/test_external_flash.$(EXE): $(BUILD_DIR)/quiz/src/external_flash_tests_symbols.o $(runner_objs) $(call object_for,$(tests_external_flash)) endif diff --git a/scripts/device/openocd.n0101.cfg b/scripts/device/openocd.n0200.cfg similarity index 100% rename from scripts/device/openocd.n0101.cfg rename to scripts/device/openocd.n0200.cfg diff --git a/scripts/platform.device.mak b/scripts/platform.device.mak index 8b30e039b..9239f6ae3 100644 --- a/scripts/platform.device.mak +++ b/scripts/platform.device.mak @@ -1,4 +1,4 @@ -MODEL ?= n0101 +MODEL ?= n0200 USE_LIBA = 1 EXE = elf EPSILON_BOOT_PROMPT = update diff --git a/scripts/platform.device.n0101.mak b/scripts/platform.device.n0200.mak similarity index 100% rename from scripts/platform.device.n0101.mak rename to scripts/platform.device.n0200.mak