Go to the documentation of this file.
71 #include "custom_config.h"
79 #define HIDS_CONNECTION_MAX 10
81 #define HIDS_REPORT_MAX_SIZE 20
82 #define HIDS_REPORT_MAP_MAX_SIZE 512
89 #define HIDS_REP_TYPE_INPUT 1
90 #define HIDS_REP_TYPE_OUTPUT 2
91 #define HIDS_REP_TYPE_FEATURE 3
99 #define HID_INFO_FLAG_REMOTE_WAKE_MSK 0x01
100 #define HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK 0x02
@ HIDS_EVT_REP_CHAR_WRITE
New value has been written to a report characteristic.
hids_report_type_t
HID Service write report type.
bool is_kb
TRUE if device is operating as a keyboard, FALSE if it is not.
hids_report_int_t feature_report
HID feature Report Reference value.
uint16_t bcd_hid
16-bit unsigned integer representing version number of base USB HID Specification implemented by HID ...
@ HIDS_REPORT_TYPE_KB_IN
The boot keyboard input report type.
@ HIDS_REPORT_TYPE_IN2
The input report2 type.
uint8_t conn_idx
Connect index.
uint16_t hids_service_start_handle_get(void)
Provide the interface for other modules to obtain the hids service start handle .
@ HIDS_EVT_REPORT_MODE_ENTERED
Report mode entered.
@ HIDS_EVT_IN_REP_NOTIFY_ENABLED
Input report notification enabled event.
@ HIDS_REPORT_TYPE_IN1
The input report1 type.
@ HIDS_EVT_HOST_EXIT_SUSP
Exit suspend command received.
HID Service Report characteristic define.
uint8_t report_type
Type of Report characteristic (see Report Type values)
@ HIDS_EVT_HOST_SUSP
Suspend command received.
sdk_err_t hids_service_init(hids_init_t *p_hids_init)
Initialize a HID Service instance in ATT DB.
bool out_report_sup
TRUE if output Report characteristic suport, FALSE if it is nonsupport.
hids_evt_handler_t evt_handler
Handle events in HID Service.
@ HIDS_REPORT_TYPE_RESERVED
The reserved report type.
HID Information characteristic value.
uint16_t value_len
Length of characteristic value.
@ HIDS_EVT_IN_REP_NOTIFY_DISABLED
Input report notification disabled event.
uint16_t len
The length of report map.
uint16_t len
Length of the incoming data.
@ HIDS_EVT_INVALID
Invalid event.
hids_evt_type_t evt_type
Type of event.
bool feature_report_sup
TRUE if feature Report characteristic suport, FALSE if it is nonsupport.
void(* hids_evt_handler_t)(hids_evt_t *p_evt)
HID Service event handler type.
sdk_err_t hids_input_rep_send(uint8_t conn_idx, uint8_t rep_idx, uint8_t *p_data, uint16_t length)
Send an input report.
uint16_t offset
Offset for the write operation.
hids_evt_type_t
HID Service event type.
HID Service Report Map characteristic value.
Value of a Report Reference descriptor.
hids_report_int_t output_report
HID output Report Reference value.
bool is_mouse
TRUE if device is operating as a mouse, FALSE if it is not.
hids_report_map_t report_map
HID Service Report Map characteristic value.
uint16_t sdk_err_t
SDK API result type.
uint8_t flags
See http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer....
uint8_t report_id
Non-zero value if there is more than one instance of the same Report Type.
@ HIDS_EVT_BOOT_MODE_ENTERED
Boot mode entered.
@ HIDS_REPORT_TYPE_MOUSE_IN
The boot mouse inputreport type.
hids_report_ref_t ref
Value of a Report Reference descriptor, see hids_report_ref_t.
@ HIDS_REPORT_TYPE_KB_OUT
The boot keyboard output report type.
uint8_t const * data
Incoming data, variable length.
@ HIDS_REPORT_TYPE_OUT
The output report type.
uint8_t * p_map
Pointer to the report map.
Profile/Service Utilities API.
@ HIDS_REPORT_TYPE_IN3
The input report3 type.
hids_report_type_t report_type
Type of report, see hids_report_type_t.
sdk_err_t hids_boot_mouse_in_rep_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send boot mouse input report.
@ HIDS_REPORT_TYPE_FEATURE
The feature report type.
uint8_t b_country_code
Identifies which country the hardware is localized for.
HID Service initialization variable.
hids_hid_info_t hid_info
Value of HID information characteristic.
uint8_t input_report_count
Number of Input Report characteristics.
sdk_err_t hids_boot_kb_in_rep_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send boot keyboard input report.