Skip to content

Commit d0edc30

Browse files
committed
update(demo/usb_host): move test macro before run api
1 parent 6ea1e2f commit d0edc30

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

demo/usb_host.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,38 +254,38 @@ static void usbh_msc_thread(void *argument)
254254
}
255255
#endif
256256

257+
#if TEST_USBH_CDC_ACM
257258
void usbh_cdc_acm_run(struct usbh_cdc_acm *cdc_acm_class)
258259
{
259-
#if TEST_USBH_CDC_ACM
260260
usb_osal_thread_create("usbh_cdc", 2048, CONFIG_USBHOST_PSC_PRIO + 1, usbh_cdc_acm_thread, cdc_acm_class);
261-
#endif
262261
}
263262

264263
void usbh_cdc_acm_stop(struct usbh_cdc_acm *cdc_acm_class)
265264
{
266265
}
266+
#endif
267267

268+
#if TEST_USBH_HID
268269
void usbh_hid_run(struct usbh_hid *hid_class)
269270
{
270-
#if TEST_USBH_HID
271271
usb_osal_thread_create("usbh_hid", 2048, CONFIG_USBHOST_PSC_PRIO + 1, usbh_hid_thread, hid_class);
272-
#endif
273272
}
274273

275274
void usbh_hid_stop(struct usbh_hid *hid_class)
276275
{
277276
}
277+
#endif
278278

279+
#if TEST_USBH_MSC
279280
void usbh_msc_run(struct usbh_msc *msc_class)
280281
{
281-
#if TEST_USBH_MSC
282282
usb_osal_thread_create("usbh_msc", 2048, CONFIG_USBHOST_PSC_PRIO + 1, usbh_msc_thread, msc_class);
283-
#endif
284283
}
285284

286285
void usbh_msc_stop(struct usbh_msc *msc_class)
287286
{
288287
}
288+
#endif
289289

290290
#if TEST_USBH_AUDIO
291291
#error "commercial charge"

0 commit comments

Comments
 (0)