Hi!
I use HID example and try to understand in a hid service init for why report_map_data[] with a table.
What is do this array? If I use keyboard example, I should get event in the on_hids_evt(). But this array for what?
Hi!
I use HID example and try to understand in a hid service init for why report_map_data[] with a table.
What is do this array? If I use keyboard example, I should get event in the on_hids_evt(). But this array for what?
Hi,
That array is the USB HID report descriptor. The descriptor is a hard coded array of bytes that describes the device's data packets. Which includes, how many packets the device supports, the size of the packets, and the purpose of each byte and bit in the packet.
You can read more about HID here. Also check out the specification.
Hi!
Thanks. I know that is the HID report descriptor. Should I any change in it? Or just should leave it as it is?.
Explain pls, this ble HID- it is like a keyboard? Is this example should sends some keys code out? But I have interrupt where possible to receive some data...?
It depends on what you are trying to do. If you want it to be a keyboard, you should just leave it as it is.
Not sure what you mean by "this ble HID", do you mean the HID Keyboard example from the SDK? If so, yes the example that implements the HID over GATT profile for keyboard. Yes it should send some keys out, have a look at how you can test the example here.
What you mean by receive data? What kind of data?
Yes, I mean the HID Keyboard example from the SDK.
For why function on_hid_rep_char_write(p_evt); in a BLE_HIDS_EVT_REP_CHAR_WRITE case?
You get the BLE_HIDS_EVT_REP_CHAR_WRITE event when a new value has been written to an Report characteristic. And the function on_hid_rep_char_write(p_evt) is a function for handling the HID Report Characteristic Write event.