2021-12-08 14:28:01 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2022-07-08 15:36:34 +03:00
|
|
|
#define HID_SVC_REPORT_MAP_MAX_LEN (255)
|
|
|
|
#define HID_SVC_REPORT_MAX_LEN (255)
|
2021-12-08 14:28:01 +03:00
|
|
|
#define HID_SVC_REPORT_REF_LEN (2)
|
|
|
|
#define HID_SVC_INFO_LEN (4)
|
|
|
|
#define HID_SVC_CONTROL_POINT_LEN (1)
|
|
|
|
|
2022-07-08 15:36:34 +03:00
|
|
|
#define HID_SVC_INPUT_REPORT_COUNT (3)
|
|
|
|
#define HID_SVC_OUTPUT_REPORT_COUNT (0)
|
|
|
|
#define HID_SVC_FEATURE_REPORT_COUNT (0)
|
|
|
|
#define HID_SVC_REPORT_COUNT \
|
|
|
|
(HID_SVC_INPUT_REPORT_COUNT + HID_SVC_OUTPUT_REPORT_COUNT + HID_SVC_FEATURE_REPORT_COUNT)
|
|
|
|
|
2021-12-08 14:28:01 +03:00
|
|
|
void hid_svc_start();
|
|
|
|
|
|
|
|
void hid_svc_stop();
|
|
|
|
|
|
|
|
bool hid_svc_is_started();
|
|
|
|
|
2022-07-08 15:36:34 +03:00
|
|
|
bool hid_svc_update_report_map(const uint8_t* data, uint16_t len);
|
2021-12-08 14:28:01 +03:00
|
|
|
|
2022-07-08 15:36:34 +03:00
|
|
|
bool hid_svc_update_input_report(uint8_t input_report_num, uint8_t* data, uint16_t len);
|
2021-12-08 14:28:01 +03:00
|
|
|
|
|
|
|
bool hid_svc_update_info(uint8_t* data, uint16_t len);
|