mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-16 22:21:21 +00:00
hog_keyboard_demo/hog_boot_host_demo: there's no LED byte in boot keyboard input report
This commit is contained in:
parent
1aadab7a3b
commit
cf5ed54967
@ -151,7 +151,7 @@ static const uint8_t keytable_us_shift[] = {
|
||||
/**
|
||||
* @section HOG Boot Keyboard Handler
|
||||
* @text Boot Keyboard Input Report contains a report of format
|
||||
* [ modifier, reserved, led status, 6 x usage for usage page keyboard]
|
||||
* [ modifier, reserved, 6 x usage for key 1..6 from keyboard usage]
|
||||
* Track new usages, map key usage to actual character and simulate terminal
|
||||
*/
|
||||
|
||||
@ -176,7 +176,7 @@ static void handle_boot_keyboard_event(uint8_t packet_type, uint16_t channel, ui
|
||||
uint8_t key_index;
|
||||
for (key_index = 0; key_index < NUM_KEYS; key_index++){
|
||||
|
||||
uint16_t usage = data[3 + key_index];
|
||||
uint16_t usage = data[2 + key_index];
|
||||
if (usage == 0) continue;
|
||||
if (usage >= sizeof(keytable_us_none)) continue;
|
||||
|
||||
|
@ -255,9 +255,8 @@ static int keycode_and_modifer_us_for_character(uint8_t character, uint8_t * key
|
||||
}
|
||||
|
||||
// HID Report sending
|
||||
|
||||
static void send_report(int modifier, int keycode){
|
||||
uint8_t report[] = { /* 0xa1, */ modifier, 0, 0, keycode, 0, 0, 0, 0, 0};
|
||||
uint8_t report[] = { modifier, 0, keycode, 0, 0, 0, 0, 0};
|
||||
switch (protocol_mode){
|
||||
case 0:
|
||||
hids_device_send_boot_keyboard_input_report(con_handle, report, sizeof(report));
|
||||
|
Loading…
Reference in New Issue
Block a user