2026-04-10 09:06:18 +08:00
|
|
|
#ifndef BLINKY_HID_LED_EVENT_H_
|
|
|
|
|
#define BLINKY_HID_LED_EVENT_H_
|
|
|
|
|
|
|
|
|
|
#include <app_event_manager.h>
|
|
|
|
|
#include <app_event_manager_profiler_tracer.h>
|
|
|
|
|
|
2026-04-10 19:28:20 +08:00
|
|
|
#include "keyboard_core.h"
|
|
|
|
|
|
2026-04-10 09:06:18 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
struct hid_led_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
|
|
|
uint8_t led_bm;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
APP_EVENT_TYPE_DECLARE(hid_led_event);
|
|
|
|
|
|
2026-04-14 16:42:04 +08:00
|
|
|
static inline void submit_hid_led_event(enum hid_transport transport, uint8_t led_bm)
|
|
|
|
|
{
|
|
|
|
|
struct hid_led_event *event = new_hid_led_event();
|
|
|
|
|
|
|
|
|
|
event->transport = transport;
|
|
|
|
|
event->led_bm = led_bm;
|
|
|
|
|
APP_EVENT_SUBMIT(event);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-10 09:06:18 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* BLINKY_HID_LED_EVENT_H_ */
|