X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstmf0%2Fao_arch.h;h=1450545a10c015d9d33fd2c75f95d5f68eb57f07;hb=cb756983a26595a5d2f317a6693f9a670665c86a;hp=e5f7e1f7be2677e3130979855a044d0ff9241e35;hpb=d6c3c3618a708d2a1a7948454710e6ae21c2a426;p=fw%2Faltos diff --git a/src/stmf0/ao_arch.h b/src/stmf0/ao_arch.h index e5f7e1f7..1450545a 100644 --- a/src/stmf0/ao_arch.h +++ b/src/stmf0/ao_arch.h @@ -32,11 +32,6 @@ #define AO_LED_TYPE uint16_t -#ifndef AO_TICK_TYPE -#define AO_TICK_TYPE uint16_t -#define AO_TICK_SIGNED int16_t -#endif - #define AO_PORT_TYPE uint16_t /* Various definitions to make GCC look more like SDCC */ @@ -46,9 +41,11 @@ #define __interrupt(n) #define __at(n) -#define ao_arch_reboot() \ - (stm_scb.aircr = ((STM_SCB_AIRCR_VECTKEY_KEY << STM_SCB_AIRCR_VECTKEY) | \ - (1 << STM_SCB_AIRCR_SYSRESETREQ))) +static inline void ao_arch_reboot(void) { + stm_flash.cr = (1 << STM_FLASH_CR_OBL_LAUNCH); + stm_scb.aircr = ((STM_SCB_AIRCR_VECTKEY_KEY << STM_SCB_AIRCR_VECTKEY) | + (1 << STM_SCB_AIRCR_SYSRESETREQ)); +} #define ao_arch_nop() asm("nop") @@ -58,7 +55,8 @@ * ao_romconfig.c */ -#define AO_ROMCONFIG_SYMBOL __attribute__((section(".romconfig"))) const +#define AO_ROMCONFIG_SYMBOL __attribute__((section(".init.1"))) const +#define AO_USBCONFIG_SYMBOL __attribute__((section(".init.2"))) const extern const uint16_t ao_romconfig_version; extern const uint16_t ao_romconfig_check;