altos: Allow architecture to define the type of port registers
authorKeith Packard <keithp@keithp.com>
Sat, 18 May 2013 09:53:32 +0000 (02:53 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 18 May 2013 09:53:32 +0000 (02:53 -0700)
LPC11U14 has 32-bit ports, STM32 has 16 bit ports.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao.h

index 71bfb6a1f880d36988788b8e4a99e36fcf8c1ed6..7f344736b8f0a7bd19c5d204b09be34a0b2f62a7 100644 (file)
 #define HAS_TASK       1
 #endif
 
+#ifndef AO_PORT_TYPE
+#define AO_PORT_TYPE uint8_t
+#endif
+
+typedef AO_PORT_TYPE ao_port_t;
+
 #if HAS_TASK
 #include <ao_task.h>
 #else
@@ -68,6 +74,7 @@
 #define AO_PANIC_SPI           13      /* SPI communication failure */
 #define AO_PANIC_CRASH         14      /* Processor crashed */
 #define AO_PANIC_BUFIO         15      /* Mis-using bufio API */
+#define AO_PANIC_EXTI          16      /* Mis-using exti API */
 #define AO_PANIC_SELF_TEST_CC1120      0x40 | 1        /* Self test failure */
 #define AO_PANIC_SELF_TEST_HMC5883     0x40 | 2        /* Self test failure */
 #define AO_PANIC_SELF_TEST_MPU6000     0x40 | 3        /* Self test failure */