2626/* APPLICATION INTERFACE DEFINITION RELEASE */
2727/* */
2828/* ux_api.h PORTABLE C */
29- /* 6.2.1 */
29+ /* 6.x */
3030/* AUTHOR */
3131/* */
3232/* Chaoqiong Xiao, Microsoft Corporation */
133133/* max class driver configure, */
134134/* added a new error code, */
135135/* resulting in version 6.2.1 */
136+ /* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), */
137+ /* added error checks support, */
138+ /* resulting in version 6.x */
136139/* */
137140/**************************************************************************/
138141
@@ -186,6 +189,24 @@ extern "C" {
186189#endif
187190#endif
188191
192+ /* Internal option: enable the basic USBX error checking. This define is typically used
193+ while debugging application. */
194+ #if defined(UX_ENABLE_ERROR_CHECKING ) && !defined(UX_SYSTEM_ENABLE_ERROR_CHECKING )
195+ #define UX_SYSTEM_ENABLE_ERROR_CHECKING
196+ #endif
197+
198+ /* Internal option: enable the basic USBX error checking. This define is typically used
199+ while debugging application. */
200+ #if defined(UX_ENABLE_ERROR_CHECKING ) && !defined(UX_DEVICE_STACK_ENABLE_ERROR_CHECKING )
201+ #define UX_DEVICE_STACK_ENABLE_ERROR_CHECKING
202+ #endif
203+
204+ /* Internal option: enable the basic USBX error checking. This define is typically used
205+ while debugging application. */
206+ #if defined(UX_ENABLE_ERROR_CHECKING ) && !defined(UX_HOST_STACK_ENABLE_ERROR_CHECKING )
207+ #define UX_HOST_STACK_ENABLE_ERROR_CHECKING
208+ #endif
209+
189210
190211/* Define the maximum length for class names (exclude string null-terminator). */
191212#define UX_MAX_CLASS_NAME_LENGTH 63
@@ -2658,39 +2679,67 @@ typedef struct UX_HOST_CLASS_DPUMP_STRUCT
26582679
26592680/* Define USBX Services. */
26602681
2682+ #if defined(UX_SYSTEM_ENABLE_ERROR_CHECKING )
26612683#define ux_system_initialize _ux_system_initialize
2684+ #else
2685+ #define ux_system_initialize _uxe_system_initialize
2686+ #endif
2687+
26622688#define ux_system_uninitialize _ux_system_uninitialize
26632689#define ux_system_tasks_run _ux_system_tasks_run
26642690
26652691#define ux_host_class_hub_entry _ux_host_class_hub_entry
26662692
26672693#define ux_host_class_storage_entry _ux_host_class_storage_entry
26682694
2695+ #if defined(UX_HOST_STACK_ENABLE_ERROR_CHECKING )
2696+
2697+ #define ux_host_stack_class_get _uxe_host_stack_class_get
2698+ #define ux_host_stack_class_instance_get _uxe_host_stack_class_instance_get
2699+ #define ux_host_stack_class_register _uxe_host_stack_class_register
2700+ #define ux_host_stack_device_configuration_activate _uxe_host_stack_device_configuration_activate
2701+ #define ux_host_stack_device_configuration_deactivate _uxe_host_stack_device_configuration_deactivate
2702+ #define ux_host_stack_device_configuration_get _uxe_host_stack_device_configuration_get
2703+ #define ux_host_stack_device_get _uxe_host_stack_device_get
2704+ #define ux_host_stack_device_string_get _uxe_host_stack_device_string_get
2705+ #define ux_host_stack_endpoint_transfer_abort _uxe_host_stack_endpoint_transfer_abort
2706+ #define ux_host_stack_hcd_register _uxe_host_stack_hcd_register
2707+ #define ux_host_stack_hcd_unregister _uxe_host_stack_hcd_unregister
2708+ #define ux_host_stack_interface_endpoint_get _uxe_host_stack_interface_endpoint_get
2709+ #define ux_host_stack_interface_setting_select _uxe_host_stack_interface_setting_select
2710+ #define ux_host_stack_transfer_request _uxe_host_stack_transfer_request
2711+ #define ux_host_stack_transfer_request_abort _uxe_host_stack_transfer_request_abort
2712+
2713+ #else
2714+
26692715#define ux_host_stack_class_get _ux_host_stack_class_get
2670- #define ux_host_stack_class_instance_create _ux_host_stack_class_instance_create
2671- #define ux_host_stack_class_instance_destroy _ux_host_stack_class_instance_destroy
26722716#define ux_host_stack_class_instance_get _ux_host_stack_class_instance_get
26732717#define ux_host_stack_class_register _ux_host_stack_class_register
2674- #define ux_host_stack_class_unregister _ux_host_stack_class_unregister
2675- #define ux_host_stack_configuration_interface_get _ux_host_stack_configuration_interface_get
26762718#define ux_host_stack_device_configuration_activate _ux_host_stack_device_configuration_activate
26772719#define ux_host_stack_device_configuration_deactivate _ux_host_stack_device_configuration_deactivate
26782720#define ux_host_stack_device_configuration_get _ux_host_stack_device_configuration_get
2679- #define ux_host_stack_device_configuration_select _ux_host_stack_device_configuration_select
26802721#define ux_host_stack_device_get _ux_host_stack_device_get
26812722#define ux_host_stack_device_string_get _ux_host_stack_device_string_get
26822723#define ux_host_stack_endpoint_transfer_abort _ux_host_stack_endpoint_transfer_abort
26832724#define ux_host_stack_hcd_register _ux_host_stack_hcd_register
26842725#define ux_host_stack_hcd_unregister _ux_host_stack_hcd_unregister
2685- #define ux_host_stack_initialize _ux_host_stack_initialize
2686- #define ux_host_stack_uninitialize _ux_host_stack_uninitialize
26872726#define ux_host_stack_interface_endpoint_get _ux_host_stack_interface_endpoint_get
26882727#define ux_host_stack_interface_setting_select _ux_host_stack_interface_setting_select
26892728#define ux_host_stack_transfer_request _ux_host_stack_transfer_request
26902729#define ux_host_stack_transfer_request_abort _ux_host_stack_transfer_request_abort
2730+
2731+ #endif
2732+
2733+ #define ux_host_stack_class_instance_create _ux_host_stack_class_instance_create
2734+ #define ux_host_stack_class_instance_destroy _ux_host_stack_class_instance_destroy
2735+ #define ux_host_stack_class_unregister _ux_host_stack_class_unregister
2736+ #define ux_host_stack_configuration_interface_get _ux_host_stack_configuration_interface_get
2737+ #define ux_host_stack_device_configuration_reset _ux_host_stack_device_configuration_reset
2738+ #define ux_host_stack_device_configuration_select _ux_host_stack_device_configuration_select
2739+ #define ux_host_stack_initialize _ux_host_stack_initialize
2740+ #define ux_host_stack_uninitialize _ux_host_stack_uninitialize
26912741#define ux_host_stack_hnp_polling_thread_entry _ux_host_stack_hnp_polling_thread_entry
26922742#define ux_host_stack_role_swap _ux_host_stack_role_swap
2693- #define ux_host_stack_device_configuration_reset _ux_host_stack_device_configuration_reset
26942743
26952744#define ux_host_stack_tasks_run _ux_host_stack_tasks_run
26962745#define ux_host_stack_transfer_run _ux_host_stack_transfer_run
@@ -2699,19 +2748,30 @@ typedef struct UX_HOST_CLASS_DPUMP_STRUCT
26992748#define ux_utility_pci_read _ux_utility_pci_read
27002749#define ux_utility_pci_write _ux_utility_pci_write
27012750
2702- #define ux_device_stack_alternate_setting_get _ux_device_stack_alternate_setting_get
2703- #define ux_device_stack_alternate_setting_set _ux_device_stack_alternate_setting_set
2751+ #if defined(UX_DEVICE_STACK_ENABLE_ERROR_CHECKING )
2752+
2753+ #define ux_device_stack_class_register _uxe_device_stack_class_register
2754+ #define ux_device_stack_class_unregister _uxe_device_stack_class_unregister
2755+ #define ux_device_stack_initialize _uxe_device_stack_initialize
2756+
2757+ #else
2758+
27042759#define ux_device_stack_class_register _ux_device_stack_class_register
27052760#define ux_device_stack_class_unregister _ux_device_stack_class_unregister
2761+ #define ux_device_stack_initialize _ux_device_stack_initialize
2762+
2763+ #endif
2764+ #define ux_device_stack_uninitialize _ux_device_stack_uninitialize
2765+
2766+ #define ux_device_stack_alternate_setting_get _ux_device_stack_alternate_setting_get
2767+ #define ux_device_stack_alternate_setting_set _ux_device_stack_alternate_setting_set
27062768#define ux_device_stack_configuration_get _ux_device_stack_configuration_get
27072769#define ux_device_stack_configuration_set _ux_device_stack_configuration_set
27082770#define ux_device_stack_descriptor_send _ux_device_stack_descriptor_send
27092771#define ux_device_stack_connect _ux_device_stack_connect
27102772#define ux_device_stack_disconnect _ux_device_stack_disconnect
27112773#define ux_device_stack_endpoint_stall _ux_device_stack_endpoint_stall
27122774#define ux_device_stack_host_wakeup _ux_device_stack_host_wakeup
2713- #define ux_device_stack_initialize _ux_device_stack_initialize
2714- #define ux_device_stack_uninitialize _ux_device_stack_uninitialize
27152775#define ux_device_stack_interface_delete _ux_device_stack_interface_delete
27162776#define ux_device_stack_interface_get _ux_device_stack_interface_get
27172777#define ux_device_stack_interface_set _ux_device_stack_interface_set
@@ -2740,6 +2800,10 @@ UINT ux_system_initialize(VOID *non_cached_memory_pool_start, ULONG non_cache
27402800UINT ux_system_uninitialize (VOID );
27412801UINT ux_system_tasks_run (VOID );
27422802
2803+ UINT uxe_system_initialize (VOID * non_cached_memory_pool_start , ULONG non_cached_memory_size ,
2804+ VOID * cached_memory_pool_start , ULONG cached_memory_size );
2805+
2806+
27432807/* Define USBX Host API prototypes. */
27442808
27452809UINT ux_hcd_ehci_initialize (UX_HCD * hcd );
0 commit comments