2026-04-10 13:46:50 +08:00
|
|
|
#ifndef BLINKY_HID_REPORT_SENT_EVENT_H_
|
|
|
|
|
#define BLINKY_HID_REPORT_SENT_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_report_sent_event {
|
|
|
|
|
struct app_event_header header;
|
|
|
|
|
enum hid_transport transport;
|
|
|
|
|
enum keyboard_report_type report_type;
|
|
|
|
|
uint16_t sequence;
|
|
|
|
|
bool error;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
APP_EVENT_TYPE_DECLARE(hid_report_sent_event);
|
|
|
|
|
|
2026-04-14 16:42:04 +08:00
|
|
|
static inline void submit_hid_report_sent_event(enum hid_transport transport,
|
|
|
|
|
enum keyboard_report_type report_type,
|
|
|
|
|
uint16_t sequence, bool error)
|
|
|
|
|
{
|
|
|
|
|
struct hid_report_sent_event *event = new_hid_report_sent_event();
|
|
|
|
|
|
|
|
|
|
event->transport = transport;
|
|
|
|
|
event->report_type = report_type;
|
|
|
|
|
event->sequence = sequence;
|
|
|
|
|
event->error = error;
|
|
|
|
|
APP_EVENT_SUBMIT(event);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-10 13:46:50 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* BLINKY_HID_REPORT_SENT_EVENT_H_ */
|