X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao.h;h=a02b74e4d7228bdcaaf2e403b05119de2f67f438;hb=refs%2Fheads%2Fad1256;hp=9c0c86044558ba0d417d3d144eaa81a98b0c95f7;hpb=b8e607960f2f399fd6ba92a8c97ab72e19812d3f;p=fw%2Faltos diff --git a/src/kernel/ao.h b/src/kernel/ao.h index 9c0c8604..a02b74e4 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -76,18 +76,32 @@ typedef AO_PORT_TYPE ao_port_t; #define AO_PANIC_SELF_TEST_MPU6000 0x40 | 3 /* Self test failure */ #define AO_PANIC_SELF_TEST_MPU9250 0x40 | 3 /* Self test failure */ #define AO_PANIC_SELF_TEST_MS5607 0x40 | 4 /* Self test failure */ +#define AO_PANIC_SELF_TEST_ADS 0x40 | 5 /* Self test failure */ /* Stop the operating system, beeping and blinking the reason */ void ao_panic(uint8_t reason); +/* + * ao_romconfig.c + */ + +#define AO_ROMCONFIG_VERSION 2 + +extern AO_ROMCONFIG_SYMBOL uint16_t ao_romconfig_version; +extern AO_ROMCONFIG_SYMBOL uint16_t ao_romconfig_check; +extern AO_ROMCONFIG_SYMBOL uint16_t ao_serial_number; +#if HAS_RADIO +extern AO_ROMCONFIG_SYMBOL uint32_t ao_radio_cal; +#endif + /* * ao_timer.c */ #ifndef AO_TICK_TYPE -#define AO_TICK_TYPE uint16_t -#define AO_TICK_SIGNED int16_t +#define AO_TICK_TYPE uint32_t +#define AO_TICK_SIGNED int32_t #endif extern volatile AO_TICK_TYPE ao_tick_count; @@ -103,6 +117,10 @@ extern volatile AO_TICK_TYPE ao_tick_count; AO_TICK_TYPE ao_time(void); +/* Returns the current time in ns */ +uint64_t +ao_time_ns(void); + /* Suspend the current task until ticks time has passed */ void ao_delay(uint16_t ticks); @@ -230,7 +248,7 @@ ao_cmd_filter(void); #include #endif -#if LEDS_AVAILABLE +#if LEDS_AVAILABLE || HAS_LED #include #endif