diff --git a/main/services/ble_hid.c b/main/services/ble_hid.c index 0d8aef5..1d2bb43 100644 --- a/main/services/ble_hid.c +++ b/main/services/ble_hid.c @@ -27,9 +27,9 @@ static const char *TAG = "ble_hid"; #define HID_CC_RPT_VOLUME_UP 0x40 #define HID_CC_RPT_VOLUME_DOWN 0x80 #define HID_CC_RPT_MUTE 1 -#define HID_CC_RPT_PLAY 5 -#define HID_CC_RPT_SCAN_NEXT_TRK 10 -#define HID_CC_RPT_SCAN_PREV_TRK 11 +#define HID_CC_RPT_PLAY_PAUSE 13 +#define HID_CC_RPT_SCAN_NEXT_TRK 10 +#define HID_CC_RPT_SCAN_PREV_TRK 11 /* * Keyboard (Report ID 1) + Consumer Control (Report ID 2, mediaReportMap2). @@ -113,8 +113,9 @@ static const unsigned char s_hid_report_map[] = { 0x09, 0xB5, // Usage (Scan Next Track) 0x09, 0xB6, // Usage (Scan Previous Track) 0x09, 0xB7, // Usage (Stop) + 0x09, 0xCD, // Usage (Play/Pause) 0x15, 0x01, // Logical Minimum (1) - 0x25, 0x0C, // Logical Maximum (12) + 0x25, 0x0D, // Logical Maximum (13) 0x75, 0x04, // Report Size (4) 0x95, 0x01, // Report Count (1) 0x81, 0x00, // Input (Data, Array, Absolute) @@ -187,7 +188,7 @@ static bool ble_hid_encode_consumer_report(uint16_t usage, uint8_t buffer[HID_CO ble_hid_cc_set_button(buffer, HID_CC_RPT_MUTE); return true; case HID_CONSUMER_PLAY_PAUSE: - ble_hid_cc_set_button(buffer, HID_CC_RPT_PLAY); + ble_hid_cc_set_button(buffer, HID_CC_RPT_PLAY_PAUSE); return true; case HID_CONSUMER_SCAN_NEXT: ble_hid_cc_set_button(buffer, HID_CC_RPT_SCAN_NEXT_TRK);