mirror of https://github.com/ARMmbed/mbed-os.git
Fix USB init problems
Initialize the _transfer structure so the behavior is the same regardless of prior memory contents. This fixes a hang during USB testing when CI flags are used.pull/9768/head
parent
de12bb57fa
commit
23f3c01633
|
@ -1140,6 +1140,8 @@ USBDevice::USBDevice(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint1
|
|||
this->product_release = product_release;
|
||||
|
||||
memset(_endpoint_info, 0, sizeof(_endpoint_info));
|
||||
memset(&_transfer, 0, sizeof(_transfer));
|
||||
_transfer.user_callback = None;
|
||||
|
||||
_setup_ready = false;
|
||||
_abort_control = false;
|
||||
|
@ -1163,6 +1165,8 @@ USBDevice::USBDevice(uint16_t vendor_id, uint16_t product_id, uint16_t product_r
|
|||
this->product_release = product_release;
|
||||
|
||||
memset(_endpoint_info, 0, sizeof(_endpoint_info));
|
||||
memset(&_transfer, 0, sizeof(_transfer));
|
||||
_transfer.user_callback = None;
|
||||
|
||||
_setup_ready = false;
|
||||
_abort_control = false;
|
||||
|
|
Loading…
Reference in New Issue