X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao.h;h=a794ba710e62d584d32ce57c5d131e85c379981d;hb=0bae4b25882983cd0b7950b3e80b6d93a72f0847;hp=48b06490aebeb8918580f78ae97fa9818110f669;hpb=f2e5ffd839fe5be99359e4c86a96f03148bac698;p=fw%2Faltos diff --git a/src/kernel/ao.h b/src/kernel/ao.h index 48b06490..a794ba71 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -72,6 +72,7 @@ typedef AO_PORT_TYPE ao_port_t; #define AO_PANIC_BUFIO 15 /* Mis-using bufio API */ #define AO_PANIC_EXTI 16 /* Mis-using exti API */ #define AO_PANIC_FAST_TIMER 17 /* Mis-using fast timer API */ +#define AO_PANIC_ADC 18 /* Mis-using ADC interface */ #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 */ @@ -123,6 +124,16 @@ ao_timer_init(void); void ao_clock_init(void); +#if AO_POWER_MANAGEMENT +/* Go to low power clock */ +void +ao_clock_suspend(void); + +/* Restart full-speed clock */ +void +ao_clock_resume(void); +#endif + /* * ao_mutex.c */ @@ -652,6 +663,7 @@ union ao_monitor { extern __xdata union ao_monitor ao_monitor_ring[AO_MONITOR_RING]; #define ao_monitor_ring_next(n) (((n) + 1) & (AO_MONITOR_RING - 1)) +#define ao_monitor_ring_prev(n) (((n) - 1) & (AO_MONITOR_RING - 1)) extern __data uint8_t ao_monitoring; extern __data uint8_t ao_monitor_head;