hid_service.h 769 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdbool.h>
  4. #define HID_SVC_REPORT_MAP_MAX_LEN (255)
  5. #define HID_SVC_REPORT_MAX_LEN (255)
  6. #define HID_SVC_REPORT_REF_LEN (2)
  7. #define HID_SVC_INFO_LEN (4)
  8. #define HID_SVC_CONTROL_POINT_LEN (1)
  9. #define HID_SVC_INPUT_REPORT_COUNT (3)
  10. #define HID_SVC_OUTPUT_REPORT_COUNT (0)
  11. #define HID_SVC_FEATURE_REPORT_COUNT (0)
  12. #define HID_SVC_REPORT_COUNT \
  13. (HID_SVC_INPUT_REPORT_COUNT + HID_SVC_OUTPUT_REPORT_COUNT + HID_SVC_FEATURE_REPORT_COUNT)
  14. void hid_svc_start();
  15. void hid_svc_stop();
  16. bool hid_svc_is_started();
  17. bool hid_svc_update_report_map(const uint8_t* data, uint16_t len);
  18. bool hid_svc_update_input_report(uint8_t input_report_num, uint8_t* data, uint16_t len);
  19. bool hid_svc_update_info(uint8_t* data, uint16_t len);