Skip to content

Commit 33f4745

Browse files
committed
Update USB.cpp
1 parent 9f1ccb9 commit 33f4745

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

libraries/USB/src/USB.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,6 @@ ESPUSB::ESPUSB(size_t task_stack_size, uint8_t event_task_priority)
115115
,_task_stack_size(task_stack_size)
116116
,_event_task_priority(event_task_priority)
117117
{
118-
}
119-
120-
ESPUSB::~ESPUSB(){
121-
if (arduino_usb_event_loop_handle) {
122-
esp_event_loop_delete(arduino_usb_event_loop_handle);
123-
arduino_usb_event_loop_handle = NULL;
124-
}
125-
}
126-
127-
bool ESPUSB::begin(){
128118
if (!arduino_usb_event_loop_handle) {
129119
esp_event_loop_args_t event_task_args = {
130120
.queue_size = 5,
@@ -137,6 +127,16 @@ bool ESPUSB::begin(){
137127
log_e("esp_event_loop_create failed");
138128
}
139129
}
130+
}
131+
132+
ESPUSB::~ESPUSB(){
133+
if (arduino_usb_event_loop_handle) {
134+
esp_event_loop_delete(arduino_usb_event_loop_handle);
135+
arduino_usb_event_loop_handle = NULL;
136+
}
137+
}
138+
139+
bool ESPUSB::begin(){
140140
if(!_started){
141141
tinyusb_device_config_t tinyusb_device_config = {
142142
.vid = vid,

0 commit comments

Comments
 (0)