X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fcore%2Fao.h;h=0886260f5e4a6e2726b06661f6b6cdcfb4123a4a;hp=e3161b4c383319031c06f17e9a9462015296a522;hb=3e8b72a9dc5b6c3a0f6132dc2dec04f8c08a1deb;hpb=93a9aa703a0173e13b327ed432e6d52e90ebfa1b diff --git a/src/core/ao.h b/src/core/ao.h index e3161b4c..0886260f 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -43,8 +43,16 @@ #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 +#else +#include #endif /* @@ -66,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 */ @@ -94,7 +103,7 @@ extern volatile __data AO_TICK_TYPE ao_tick_count; #define AO_SEC_TO_TICKS(s) ((s) * AO_HERTZ) /* Returns the current time in ticks */ -uint16_t +AO_TICK_TYPE ao_time(void); /* Suspend the current task until ticks time has passed */ @@ -144,6 +153,9 @@ extern __pdata uint32_t ao_cmd_lex_u32; extern __pdata char ao_cmd_lex_c; extern __pdata enum ao_cmd_status ao_cmd_status; +void +ao_put_string(__code char *s); + void ao_cmd_lex(void); @@ -374,6 +386,9 @@ ao_gps_print(__xdata struct ao_gps_orig *gps_data); void ao_gps_tracking_print(__xdata struct ao_gps_tracking_orig *gps_tracking_data); +void +ao_gps_show(void) __reentrant; + void ao_gps_init(void); @@ -508,6 +523,8 @@ ao_telemetry_tiny_init(void); extern __xdata uint8_t ao_radio_dma; +extern __xdata int8_t ao_radio_rssi; + #ifdef PKT_APPEND_STATUS_1_CRC_OK #define AO_RADIO_STATUS_CRC_OK PKT_APPEND_STATUS_1_CRC_OK #else @@ -532,7 +549,7 @@ ao_radio_send(const __xdata void *d, uint8_t size) __reentrant; #if HAS_RADIO_RECV uint8_t -ao_radio_recv(__xdata void *d, uint8_t size) __reentrant; +ao_radio_recv(__xdata void *d, uint8_t size, uint8_t timeout) __reentrant; void ao_radio_recv_abort(void); @@ -638,7 +655,7 @@ ao_monitor_init(void) __reentrant; #define AO_READ_AGAIN (-1) struct ao_stdio { - int (*pollchar)(void); + int (*_pollchar)(void); /* Called with interrupts blocked */ void (*putchar)(char c) __reentrant; void (*flush)(void); uint8_t echo; @@ -686,6 +703,8 @@ struct ao_ignition { uint8_t firing; }; +extern __code char * __code ao_igniter_status_names[]; + extern __xdata struct ao_ignition ao_ignition[2]; enum ao_igniter_status