diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-18 02:53:32 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-18 02:53:32 -0700 |
commit | e4385d29fc1b233b3ad56d4af68a175e760c1751 (patch) | |
tree | 005521949049a88d7208c68b8faaf1c5ac494e58 | |
parent | ca4f3161258356c06fe1270f7ccdf0d6939e2d34 (diff) |
altos: Allow architecture to define the type of port registers
LPC11U14 has 32-bit ports, STM32 has 16 bit ports.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/core/ao.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/ao.h b/src/core/ao.h index 71bfb6a1..7f344736 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -43,6 +43,12 @@ #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 */ |