@@ -101,8 +101,8 @@ static VOID ux_demo_error_callback(UINT system_level, UINT system_context, UINT
101101/************************************************************/
102102/** usbx device hid demo mouse */
103103/************************************************************/
104- UINT usbx_demo_init (VOID );
105- UINT usbx_demo_uninit (VOID );
104+ UINT ux_demo_device_hid_init (VOID );
105+ UINT ux_demo_device_hid_uninit (VOID );
106106UINT ux_device_hid_init (VOID );
107107UINT ux_device_hid_uninit (VOID );
108108UINT ux_device_hid_mouse_cursor_move (UX_SLAVE_CLASS_HID * device_hid );
@@ -377,17 +377,17 @@ VOID tx_application_define(VOID *first_unused_memory)
377377{
378378 UX_PARAMETER_NOT_USED (first_unused_memory );
379379
380- usbx_demo_init ();
380+ ux_demo_device_hid_init ();
381381}
382382#endif /* DEMO_TEST */
383383
384384/********************************************************************/
385- /** usbx_demo_init */
385+ /** ux_demo_device_hid_init */
386386/** */
387387/** Create the demo threads and initialize the USBX HID device */
388388/** stack used by this sample. */
389389/********************************************************************/
390- UINT usbx_demo_init (VOID )
390+ UINT ux_demo_device_hid_init (VOID )
391391{
392392UINT status ;
393393
@@ -427,12 +427,13 @@ UINT ux_device_hid_init(VOID)
427427UINT status ;
428428UX_SLAVE_CLASS_HID_PARAMETER hid_mouse_parameter = {UX_NULL };
429429
430-
430+ #ifndef DEMO_TEST
431431 /* Initialize USBX Memory. */
432432 status = ux_system_initialize (ux_system_memory_pool , UX_DEVICE_MEMORY_STACK_SIZE , UX_NULL , 0 );
433433
434434 if (status != UX_SUCCESS )
435435 return status ;
436+ #endif /* DEMO_TEST */
436437
437438 /* Install the device portion of USBX. */
438439 status = ux_device_stack_initialize (device_framework_high_speed , DEVICE_FRAMEWORK_LENGTH_HIGH_SPEED ,
@@ -467,12 +468,12 @@ UX_SLAVE_CLASS_HID_PARAMETER hid_mouse_parameter = {UX_NULL};
467468}
468469
469470/********************************************************************/
470- /** usbx_demo_uninit */
471+ /** ux_demo_device_hid_uninit */
471472/** */
472- /** Stop the demo worker threads created by usbx_demo_init so the */
473- /** RTOS sample can be shut down cleanly. */
473+ /** Stop the demo worker threads created by ux_demo_device_hid_init */
474+ /** so the RTOS sample can be shut down cleanly. */
474475/********************************************************************/
475- UINT usbx_demo_uninit (VOID )
476+ UINT ux_demo_device_hid_uninit (VOID )
476477{
477478
478479UINT status ;
@@ -581,15 +582,15 @@ VOID ux_demo_thread_entry(ULONG thread_input)
581582
582583 UX_PARAMETER_NOT_USED (thread_input );
583584
584- #ifndef EXTERNAL_DCD_INITIALIZE
585+ #ifndef DEMO_TEST
585586
586587 /* Register the USB device simulator controllers for testing */
587588 ux_dcd_sim_slave_initialize ();
588- #else /* EXTERNAL_DCD_INITIALIZE */
589+ #else /* DEMO_TEST */
589590
590591 /* Register the USB device controllers available in this system */
591592 usb_device_dcd_initialize (UX_NULL );
592- #endif /* EXTERNAL_DCD_INITIALIZE */
593+ #endif /* DEMO_TEST */
593594
594595}
595596
0 commit comments