refactor: add SetStateData and audio send priority
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
|
||||
int reportSeqCounter = 0;
|
||||
uint8_t packetCounter = 0;
|
||||
bool spk_active = false;
|
||||
|
||||
uint8_t interrupt_in_data[63] = {
|
||||
0x7f, 0x7d, 0x7f, 0x7e, 0x00, 0x00, 0xa7,
|
||||
@@ -132,7 +131,6 @@ bool tud_audio_set_itf_cb(uint8_t rhport, tusb_control_request_t const *p_reques
|
||||
|
||||
if (itf == 1) {
|
||||
printf("[AUDIO] Set interface Speaker to alternate setting %d\n", alt);
|
||||
spk_active = alt;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -158,10 +156,6 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep
|
||||
if (report_id == 0) {
|
||||
switch (buffer[0]) {
|
||||
case 0x02: {
|
||||
set_state_data(buffer + 1, bufsize - 1);
|
||||
if (spk_active) {
|
||||
break;
|
||||
}
|
||||
uint8_t outputData[78];
|
||||
outputData[0] = 0x31;
|
||||
outputData[1] = reportSeqCounter << 4;
|
||||
|
||||
Reference in New Issue
Block a user