fix: DSE Profile Save. Thanks @fuhuasxflwb
This commit is contained in:
+8
-1
@@ -480,7 +480,14 @@ vector<uint8_t> get_feature_data(uint8_t reportId, uint16_t len) {
|
|||||||
if (feature_data.contains(reportId)) {
|
if (feature_data.contains(reportId)) {
|
||||||
ret = feature_data[reportId];
|
ret = feature_data[reportId];
|
||||||
}
|
}
|
||||||
if (!feature_data.contains(reportId) || reportId == 0x81) {
|
if (!feature_data.contains(reportId) ||
|
||||||
|
// Get Test Command Result
|
||||||
|
reportId == 0x81 ||
|
||||||
|
// DSE: Set Profile Save?
|
||||||
|
reportId == 0x63 ||
|
||||||
|
reportId == 0x65 ||
|
||||||
|
reportId == 0x64
|
||||||
|
) {
|
||||||
if (hid_control_cid != 0) {
|
if (hid_control_cid != 0) {
|
||||||
uint8_t get_feature[] = {0x43, reportId};
|
uint8_t get_feature[] = {0x43, reportId};
|
||||||
l2cap_send(hid_control_cid, get_feature, sizeof(get_feature));
|
l2cap_send(hid_control_cid, get_feature, sizeof(get_feature));
|
||||||
|
|||||||
+5
-1
@@ -154,7 +154,11 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (report_id == 0x80) {
|
if (report_id == 0x80 ||
|
||||||
|
// DSE: Write Profile Block
|
||||||
|
report_id == 0x60 ||
|
||||||
|
report_id == 0x62 ||
|
||||||
|
report_id == 0x61) {
|
||||||
set_feature_data(report_id,const_cast<uint8_t *>(buffer),bufsize);
|
set_feature_data(report_id,const_cast<uint8_t *>(buffer),bufsize);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user