9 #ifndef __EVENT_BUS_H__
10 #define __EVENT_BUS_H__
14 #include "sdk_errors.h"
20 #elif defined(__ICCAR_)
22 #pragma language=extended
23 #elif defined(__GNUC__)
28 #define EVENT_GROUP(_event_type) (event_group_t)((unsigned long)(_event_type) >> 8)
47 EVT_SYSTEM_GYRO_STATE,
62 EVT_HID_REPORT_OUTPUT,
63 EVT_HID_REPORT_FEATURE,
91 uint32_t down_timestamp;
127 #if defined(__CC_ARM)
129 #elif defined(__ICCAR_)
130 #pragma language=restore
131 #elif defined(__GNUC__)
136 #define BT_CONN_STATE_DISCONNECTED 0
137 #define BT_CONN_STATE_CONNECTED 1
138 #define BT_CONN_STATE_SECURED 2
141 #define BT_ADV_STATE_IDLE 0
142 #define BT_ADV_STATE_ACTIVE 1
143 #define BT_ADV_STATE_ACTIVE_BONDABLE 2
146 #define BT_DFU_STATE_STARTED 0
147 #define BT_DFU_STATE_FINISHED 1
148 #define BT_DFU_STATE_ERROR 2
151 #define EVT_ATVV_STATE_ENABLED 0
152 #define EVT_ATVV_STATE_DISABLED 1
153 #define EVT_ATVV_STATE_MIC_OPEN 2
154 #define EVT_ATVV_STATE_MIC_CLOSE 3
155 #define EVT_ATVV_STATE_SEARCH_TIMEOUT 4
163 typedef bool (*event_handler_t)(const event_t *p_event);