#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
#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 */
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
*/
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;