mirror of https://github.com/ARMmbed/mbed-os.git
USBAudio , USBSerial :fix call back
parent
408e92139c
commit
2f3a3da00b
|
@ -313,7 +313,8 @@ void USBAudio::USBCallback_requestCompleted(uint8_t * buf, uint32_t length) {
|
||||||
switch (transfer->setup.bRequest) {
|
switch (transfer->setup.bRequest) {
|
||||||
case REQUEST_SET_CUR:
|
case REQUEST_SET_CUR:
|
||||||
mute = data & 0xff;
|
mute = data & 0xff;
|
||||||
updateVol.call();
|
if (updateVol)
|
||||||
|
updateVol.call();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -324,7 +325,8 @@ void USBAudio::USBCallback_requestCompleted(uint8_t * buf, uint32_t length) {
|
||||||
case REQUEST_SET_CUR:
|
case REQUEST_SET_CUR:
|
||||||
volCur = data;
|
volCur = data;
|
||||||
volume = (float)volCur/(float)volMax;
|
volume = (float)volCur/(float)volMax;
|
||||||
updateVol.call();
|
if (updateVol)
|
||||||
|
updateVol.call();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -56,8 +56,9 @@ bool USBSerial::EPBULK_OUT_callback() {
|
||||||
buf.queue(c[i]);
|
buf.queue(c[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//call a potential handler
|
//call a potential handlenr
|
||||||
rx.call();
|
if (rx)
|
||||||
|
rx.call();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue