#ifndef BLINKY_KEY_FUNCTION_EVENT_H_ #define BLINKY_KEY_FUNCTION_EVENT_H_ #include #include #ifdef __cplusplus extern "C" { #endif enum key_function_action { KEY_FUNCTION_ACTION_RELEASE = 0U, KEY_FUNCTION_ACTION_PRESS = 1U, }; struct key_function_event { struct app_event_header header; uint16_t usage; uint8_t action; }; APP_EVENT_TYPE_DECLARE(key_function_event); static inline void submit_key_function_event(uint16_t usage, uint8_t action) { struct key_function_event *event = new_key_function_event(); event->usage = usage; event->action = action; APP_EVENT_SUBMIT(event); } #ifdef __cplusplus } #endif #endif /* BLINKY_KEY_FUNCTION_EVENT_H_ */