39 lines
895 B
C
39 lines
895 B
C
|
|
#ifndef BLINKY_HID_CHANNEL_STATE_EVENT_H_
|
||
|
|
#define BLINKY_HID_CHANNEL_STATE_EVENT_H_
|
||
|
|
|
||
|
|
#include <app_event_manager.h>
|
||
|
|
#include <app_event_manager_profiler_tracer.h>
|
||
|
|
|
||
|
|
#include "keyboard_core.h"
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
struct hid_channel_state_event {
|
||
|
|
struct app_event_header header;
|
||
|
|
enum hid_send_channel channel;
|
||
|
|
uint8_t report_ready_bm;
|
||
|
|
enum keyboard_protocol_mode protocol_mode;
|
||
|
|
};
|
||
|
|
|
||
|
|
APP_EVENT_TYPE_DECLARE(hid_channel_state_event);
|
||
|
|
|
||
|
|
static inline void submit_hid_channel_state_event(
|
||
|
|
enum hid_send_channel channel, uint8_t report_ready_bm,
|
||
|
|
enum keyboard_protocol_mode protocol_mode)
|
||
|
|
{
|
||
|
|
struct hid_channel_state_event *event = new_hid_channel_state_event();
|
||
|
|
|
||
|
|
event->channel = channel;
|
||
|
|
event->report_ready_bm = report_ready_bm;
|
||
|
|
event->protocol_mode = protocol_mode;
|
||
|
|
APP_EVENT_SUBMIT(event);
|
||
|
|
}
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif /* BLINKY_HID_CHANNEL_STATE_EVENT_H_ */
|