1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** USBX Component */ 16 /** */ 17 /** System */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 /* Include necessary system files. */ 23 24 #define UX_SOURCE_CODE 25 26 #include "ux_api.h" 27 #include "ux_system.h" 28 #include "ux_host_stack.h" 29 #include "ux_device_stack.h" 30 31 32 #if defined(UX_STANDALONE) || defined(UX_HOST_STANDALONE) || defined(UX_DEVICE_STANDALONE) || defined(UX_OTG_STANDALONE) 33 /**************************************************************************/ 34 /* */ 35 /* FUNCTION RELEASE */ 36 /* */ 37 /* _ux_system_tasks_run PORTABLE C */ 38 /* 6.1.10 */ 39 /* AUTHOR */ 40 /* */ 41 /* Chaoqiong Xiao, Microsoft Corporation */ 42 /* */ 43 /* DESCRIPTION */ 44 /* */ 45 /* This function runs USB system tasks, including possible tasks for */ 46 /* host, device and OTG. */ 47 /* */ 48 /* It's for standalone mode. */ 49 /* */ 50 /* INPUT */ 51 /* */ 52 /* None */ 53 /* */ 54 /* OUTPUT */ 55 /* */ 56 /* None */ 57 /* */ 58 /* CALLS */ 59 /* */ 60 /* _ux_device_stack_tasks_run Run device tasks */ 61 /* _ux_host_stack_tasks_run Run host tasks */ 62 /* */ 63 /* CALLED BY */ 64 /* */ 65 /* Application */ 66 /* */ 67 /* RELEASE HISTORY */ 68 /* */ 69 /* DATE NAME DESCRIPTION */ 70 /* */ 71 /* 01-31-2022 Chaoqiong Xiao Initial Version 6.1.10 */ 72 /* */ 73 /**************************************************************************/ _ux_system_tasks_run(VOID)74UINT _ux_system_tasks_run(VOID) 75 { 76 #if defined(UX_DEVICE_STANDALONE) && !defined(UX_HOST_SIDE_ONLY) 77 _ux_device_stack_tasks_run(); 78 #endif 79 #if defined(UX_HOST_STANDALONE) && !defined(UX_DEVICE_SIDE_ONLY) 80 _ux_host_stack_tasks_run(); 81 #endif 82 #if defined(UX_OTG_STANDALONE) && defined(UX_OTG_SUPPORT) 83 _ux_otg_tasks_run(); 84 #endif 85 86 /* Return code not used now. */ 87 return(0); 88 } 89 #endif 90