USBAudio , USBSerial :fix call back

pull/3467/head
Michel Jaouen 2016-11-22 10:39:40 +01:00 committed by Anna Bridge
parent 408e92139c
commit 2f3a3da00b
2 changed files with 7 additions and 4 deletions

View File

@ -313,7 +313,8 @@ void USBAudio::USBCallback_requestCompleted(uint8_t * buf, uint32_t length) {
switch (transfer->setup.bRequest) {
case REQUEST_SET_CUR:
mute = data & 0xff;
updateVol.call();
if (updateVol)
updateVol.call();
break;
default:
break;
@ -324,7 +325,8 @@ void USBAudio::USBCallback_requestCompleted(uint8_t * buf, uint32_t length) {
case REQUEST_SET_CUR:
volCur = data;
volume = (float)volCur/(float)volMax;
updateVol.call();
if (updateVol)
updateVol.call();
break;
default:
break;

View File

@ -56,8 +56,9 @@ bool USBSerial::EPBULK_OUT_callback() {
buf.queue(c[i]);
}
//call a potential handler
rx.call();
//call a potential handlenr
if (rx)
rx.call();
return true;
}