altos/stm32f4: Add more stm32f413 definitions and support code
[fw/altos] / src / stm32f4 / ao_arch.h
index 083a4e5b448763779c24aa8d9d7c19e3a2ee021b..73dc3e9359e57f107c63c281028784c3496e6fdb 100644 (file)
 #include <stm32f4.h>
 
 #ifndef AO_STACK_SIZE
-#define AO_STACK_SIZE  1024
+#define AO_STACK_SIZE  2048
+#endif
+
+#ifndef HAS_TASK_QUEUE
+#define HAS_TASK_QUEUE 1
 #endif
 
 #define AO_STACK_ALIGNMENT __attribute__ ((aligned(8)))
 
 #define AO_PORT_TYPE   uint16_t
 
+#define ao_arch_reboot() \
+       (stm_scb.aircr = ((STM_SCB_AIRCR_VECTKEY_KEY << STM_SCB_AIRCR_VECTKEY) | \
+                         (1 << STM_SCB_AIRCR_SYSRESETREQ)))
+
 #define ao_arch_nop()          asm("nop")
 
+#define AO_ROMCONFIG_SYMBOL __attribute__((section(".romconfig"))) const
+
 #define ao_arch_task_members\
        uint32_t *sp;                   /* saved stack pointer */