#pragma once #include #include namespace iflytop { using namespace std; typedef enum { kAppEvent_BleConnectedStateChangeEvent, kAppEvent_RunModeChangeEvent, kAppEvent_PumpWorkStateChangeEvent, } AppEventType_t; /** * * @brief * * * @注意 * 下面这个结构不易定义过大,否则容易造成栈溢出 */ typedef struct { AppEventType_t type; union event { uint32_t placeholder; } d; } AppEvent_t; static inline AppEvent_t createAppEvent(AppEventType_t type) { AppEvent_t event; event.type = type; return event; } } // namespace iflytop