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