1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** USBX Component */ 17 /** */ 18 /** System */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 24 /**************************************************************************/ 25 /* */ 26 /* COMPONENT DEFINITION RELEASE */ 27 /* */ 28 /* ux_system.h PORTABLE C */ 29 /* 6.3.0 */ 30 /* AUTHOR */ 31 /* */ 32 /* Chaoqiong Xiao, Microsoft Corporation */ 33 /* */ 34 /* DESCRIPTION */ 35 /* */ 36 /* This file contains all the header and extern functions used by the */ 37 /* USBX main system component. */ 38 /* */ 39 /* RELEASE HISTORY */ 40 /* */ 41 /* DATE NAME DESCRIPTION */ 42 /* */ 43 /* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */ 44 /* 09-30-2020 Chaoqiong Xiao Modified comment(s), */ 45 /* resulting in version 6.1 */ 46 /* 12-31-2020 Chaoqiong Xiao Modified comment(s), */ 47 /* added BOS support, */ 48 /* resulting in version 6.1.3 */ 49 /* 01-31-2022 Chaoqiong Xiao Modified comment(s), */ 50 /* added standalone support, */ 51 /* added device printer name, */ 52 /* resulting in version 6.1.10 */ 53 /* 04-25-2022 Chaoqiong Xiao Modified comment(s), */ 54 /* added device CCID name, */ 55 /* resulting in version 6.1.11 */ 56 /* 10-31-2023 Chaoqiong Xiao Modified comment(s), */ 57 /* added error checks support, */ 58 /* resulting in version 6.3.0 */ 59 /* */ 60 /**************************************************************************/ 61 62 #ifndef UX_SYSTEM_HOST_H 63 #define UX_SYSTEM_HOST_H 64 65 /* Define System component function prototypes. Note that since ux_api.h 66 includes this file, the APIs are only declared if this file is included 67 by internal code in order to prevent duplicate declarations for 68 applications. */ 69 70 71 #ifdef UX_SOURCE_CODE 72 UINT _ux_system_initialize(VOID *regular_memory_pool_start, ULONG regular_memory_size, 73 VOID *cache_safe_memory_pool_start, ULONG cache_safe_memory_size); 74 UINT _ux_system_uninitialize(VOID); 75 UINT _ux_system_tasks_run(VOID); 76 77 UINT _uxe_system_initialize(VOID *regular_memory_pool_start, ULONG regular_memory_size, 78 VOID *cache_safe_memory_pool_start, ULONG cache_safe_memory_size); 79 #endif 80 81 /* Define System component external data references. */ 82 83 extern UX_SYSTEM *_ux_system; 84 extern UX_SYSTEM_HOST *_ux_system_host; 85 extern UX_SYSTEM_SLAVE *_ux_system_slave; 86 extern UX_SYSTEM_OTG *_ux_system_otg; 87 extern UCHAR _ux_system_endpoint_descriptor_structure[]; 88 extern UCHAR _ux_system_device_descriptor_structure[]; 89 extern UCHAR _ux_system_configuration_descriptor_structure[]; 90 extern UCHAR _ux_system_interface_descriptor_structure[]; 91 extern UCHAR _ux_system_interface_association_descriptor_structure[]; 92 extern UCHAR _ux_system_string_descriptor_structure[]; 93 extern UCHAR _ux_system_dfu_functional_descriptor_structure[]; 94 extern UCHAR _ux_system_hub_descriptor_structure[]; 95 extern UCHAR _ux_system_hid_descriptor_structure[]; 96 extern UCHAR _ux_system_class_audio_interface_descriptor_structure[]; 97 extern UCHAR _ux_system_class_audio_input_terminal_descriptor_structure[]; 98 extern UCHAR _ux_system_class_audio_output_terminal_descriptor_structure[]; 99 extern UCHAR _ux_system_class_audio_feature_unit_descriptor_structure[]; 100 extern UCHAR _ux_system_class_audio_streaming_interface_descriptor_structure[]; 101 extern UCHAR _ux_system_class_audio_streaming_endpoint_descriptor_structure[]; 102 extern UCHAR _ux_system_class_pima_storage_structure[]; 103 extern UCHAR _ux_system_class_pima_object_structure[]; 104 extern UCHAR _ux_system_ecm_interface_descriptor_structure[]; 105 106 extern UCHAR _ux_system_bos_descriptor_structure[]; 107 extern UCHAR _ux_system_usb_2_0_extension_descriptor_structure[]; 108 extern UCHAR _ux_system_container_id_descriptor_structure[]; 109 110 extern UINT _ux_system_host_hcd_periodic_tree_entries[32]; 111 112 extern UCHAR _ux_system_host_class_hub_name[]; 113 extern UCHAR _ux_system_host_class_printer_name[]; 114 extern UCHAR _ux_system_host_class_storage_name[]; 115 extern UCHAR _ux_system_host_class_hid_name[]; 116 extern UCHAR _ux_system_host_class_audio_name[]; 117 extern UCHAR _ux_system_host_class_cdc_acm_name[]; 118 extern UCHAR _ux_system_host_class_cdc_dlc_name[]; 119 extern UCHAR _ux_system_host_class_cdc_ecm_name[]; 120 extern UCHAR _ux_system_host_class_prolific_name[]; 121 extern UCHAR _ux_system_host_class_dpump_name[]; 122 extern UCHAR _ux_system_host_class_pima_name[]; 123 extern UCHAR _ux_system_host_class_asix_name[]; 124 extern UCHAR _ux_system_host_class_swar_name[]; 125 extern UCHAR _ux_system_host_class_gser_name[]; 126 extern UCHAR _ux_system_host_class_hid_client_remote_control_name[]; 127 extern UCHAR _ux_system_host_class_hid_client_mouse_name[]; 128 extern UCHAR _ux_system_host_class_hid_client_keyboard_name[]; 129 130 extern UCHAR _ux_system_host_hcd_ohci_name[]; 131 extern UCHAR _ux_system_host_hcd_ehci_name[]; 132 extern UCHAR _ux_system_host_hcd_isp1161_name[]; 133 extern UCHAR _ux_system_host_hcd_isp1362_name[]; 134 extern UCHAR _ux_system_host_hcd_sh2_name[]; 135 extern UCHAR _ux_system_host_hcd_rx_name[]; 136 extern UCHAR _ux_system_host_hcd_pic32_name[]; 137 extern UCHAR _ux_system_host_hcd_stm32_name[]; 138 extern UCHAR _ux_system_host_hcd_musb_name[]; 139 extern UCHAR _ux_system_host_hcd_atm7_name[]; 140 extern UCHAR _ux_system_host_hcd_simulator_name[]; 141 142 extern UCHAR _ux_system_slave_class_storage_name[]; 143 extern UCHAR _ux_system_slave_class_storage_vendor_id[]; 144 extern UCHAR _ux_system_slave_class_storage_product_id[]; 145 extern UCHAR _ux_system_slave_class_storage_product_rev[]; 146 extern UCHAR _ux_system_slave_class_storage_product_serial[]; 147 extern UCHAR _ux_system_slave_class_audio_name[]; 148 extern UCHAR _ux_system_slave_class_cdc_acm_name[]; 149 extern UCHAR _ux_system_slave_class_dpump_name[]; 150 extern UCHAR _ux_system_slave_class_pima_name[]; 151 extern UCHAR _ux_system_slave_class_hid_name[]; 152 extern UCHAR _ux_system_slave_class_rndis_name[]; 153 extern UCHAR _ux_system_slave_class_cdc_ecm_name[]; 154 extern UCHAR _ux_system_slave_class_dfu_name[]; 155 156 extern UCHAR _ux_system_device_class_printer_name[]; 157 extern UCHAR _ux_system_device_class_ccid_name[]; 158 159 #if defined(UX_HOST_SIDE_ONLY) 160 #define _ux_system_host_tasks_run _ux_host_stack_tasks_run 161 #else 162 #define _ux_system_host_tasks_run _ux_system_tasks_run 163 #endif 164 165 #if defined(UX_DEVICE_SIDE_ONLY) 166 #define _ux_system_device_tasks_run _ux_device_stack_tasks_run 167 #else 168 #define _ux_system_device_tasks_run _ux_system_tasks_run 169 #endif 170 171 #endif 172 173