mirror of https://github.com/ARMmbed/mbed-os.git
Allow transfer to start when configuring USB
Allow reads and writes to be started when entering the configured state.pull/9768/head
parent
7c96e22fa7
commit
8e2361a6b5
|
@ -1256,7 +1256,8 @@ bool USBDevice::read(usb_ep_t endpoint, uint8_t *buffer, uint32_t max_size, uint
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!configured()) {
|
||||
bool configuring = _transfer.user_callback == SetConfiguration;
|
||||
if (!configured() && !configuring) {
|
||||
unlock();
|
||||
return false;
|
||||
}
|
||||
|
@ -1295,7 +1296,8 @@ bool USBDevice::write(usb_ep_t endpoint, uint8_t *buffer, uint32_t size)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!configured()) {
|
||||
bool configuring = _transfer.user_callback == SetConfiguration;
|
||||
if (!configured() && !configuring) {
|
||||
unlock();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue