2026-04-10 09:06:18 +08:00
|
|
|
#ifndef BLINKY_SET_PROTOCOL_EVENT_H_
|
|
|
|
|
#define BLINKY_SET_PROTOCOL_EVENT_H_
|
|
|
|
|
|
|
|
|
|
#include <app_event_manager.h>
|
|
|
|
|
#include <app_event_manager_profiler_tracer.h>
|
|
|
|
|
|
|
|
|
|
#include "keyboard_core.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
struct set_protocol_event {
|
|
|
|
|
struct app_event_header header;
|
2026-04-10 19:28:20 +08:00
|
|
|
enum hid_transport transport;
|
2026-04-10 09:06:18 +08:00
|
|
|
enum keyboard_protocol_mode protocol_mode;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
APP_EVENT_TYPE_DECLARE(set_protocol_event);
|
|
|
|
|
|
2026-04-14 16:42:04 +08:00
|
|
|
static inline void submit_set_protocol_event(enum hid_transport transport,
|
|
|
|
|
enum keyboard_protocol_mode protocol_mode)
|
|
|
|
|
{
|
|
|
|
|
struct set_protocol_event *event = new_set_protocol_event();
|
|
|
|
|
|
|
|
|
|
event->transport = transport;
|
|
|
|
|
event->protocol_mode = protocol_mode;
|
|
|
|
|
APP_EVENT_SUBMIT(event);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-10 09:06:18 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* BLINKY_SET_PROTOCOL_EVENT_H_ */
|