Skip to content

Commit 4b71459

Browse files
committed
Fix mutex issue
1 parent 87f2f7f commit 4b71459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usb/device/USBCDC_ECM/USBCDC_ECM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include "stdint.h"
18+
#include <stdint.h>
1919
#include "USBCDC_ECM.h"
2020
#include "EndpointResolver.h"
2121
#include "usb_phy_api.h"
@@ -79,6 +79,7 @@ void USBCDC_ECM::_init()
7979
MBED_ASSERT(resolver.valid());
8080

8181
_thread.start(callback(&_queue, &events::EventQueue::dispatch_forever));
82+
_rx_queue.resize(MAX_SEGMENT_SIZE);
8283
}
8384

8485
void USBCDC_ECM::callback_reset()
@@ -316,7 +317,6 @@ void USBCDC_ECM::callback_set_interface(uint16_t interface, uint8_t alternate)
316317

317318
if (alternate) {
318319
_packet_filter = 0;
319-
_rx_queue.resize(MAX_SEGMENT_SIZE);
320320

321321
endpoint_add(_int_in, MAX_PACKET_SIZE_INT, USB_EP_TYPE_INT, &USBCDC_ECM::_int_callback);
322322
endpoint_add(_bulk_in, MAX_PACKET_SIZE_BULK, USB_EP_TYPE_BULK, &USBCDC_ECM::_bulk_in_callback);

0 commit comments

Comments
 (0)