/**************************************************************************//* *//* Copyright (c) Microsoft Corporation. All rights reserved. *//* *//* This software is licensed under the Microsoft Software License *//* Terms for Microsoft Azure RTOS. Full text of the license can be *//* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA *//* and in the root directory of this software. *//* */.../**************************************************************************/.../**************************************************************************//**************************************************************************//** *//** USBX Component *//** *//** Port Specific *//** */.../**************************************************************************//**************************************************************************/.../**************************************************************************//* *//* PORT SPECIFIC C INFORMATION RELEASE *//* *//* ux_port.h Generic *//* 6.1.10 *//* *//* AUTHOR *//* *//* Chaoqiong Xiao, Microsoft Corporation *//* *//* DESCRIPTION *//* *//* This file contains data type definitions that make USBX function *//* identically on a variety of different processor architectures. *//* *//* RELEASE HISTORY *//* *//* DATE NAME DESCRIPTION *//* *//* 12-31-2020 Chaoqiong Xiao Initial Version 6.1.3 *//* 01-31-2022 Chaoqiong Xiao Modified comment(s), *//* moved tx_api.h include and *//* typedefs from ux_api.h, *//* resulting in version 6.1.10 *//* */.../**************************************************************************/#ifndefUX_PORT_H#defineUX_PORT_H/* Determine if the optional USBX user define file should be used. */#ifdefUX_INCLUDE_USER_DEFINE_FILE/* Yes, include the user defines in ux_user.h. The defines in this file may alternately be defined on the command line. *//* ... */#include"ux_user.h"/* ... */#endif/* Include library header files. */#include<stdio.h>#include<string.h>#if!defined(UX_STANDALONE)#include"tx_api.h"#else/* VAR types used in UX, if TX still used, expects tx_api.h included before include this. *//* ... */#if!defined(TX_API_H)&&!defined(TX_PORT_H)#include<stdint.h>typedefvoidVOID;typedefcharCHAR;typedefunsignedcharUCHAR;typedefintINT;typedefunsignedintUINT;typedeflongLONG;typedefunsignedlongULONG;typedefshortSHORT;typedefunsignedshortUSHORT;typedefuint64_tULONG64;#ifndefALIGN_TYPE_DEFINED#defineALIGN_TYPEULONG#endif/* ... */#endif/* ... */#endif/* CPU definition for X86 systems without preemptive timer function. This will make USBX uses the controller for the timer. *//* ... */#undefTHREADX_X86_NO_PTIMER/* For X86 systems, the define #define UX_USE_IO_INSTRUCTIONS should be used. *//* Define additional generic USBX types. */typedeflongSLONG;/* Generic USBX Project constants follow. */#ifndefUX_PERIODIC_RATE#defineUX_PERIODIC_RATE100#endif#ifndefUX_MAX_CLASS_DRIVER#defineUX_MAX_CLASS_DRIVER2#endif#ifndefUX_MAX_SLAVE_CLASS_DRIVER#defineUX_MAX_SLAVE_CLASS_DRIVER2#endif#ifndefUX_MAX_HCD#defineUX_MAX_HCD1#endif#ifndefUX_MAX_DEVICES#defineUX_MAX_DEVICES2#endif#ifndefUX_MAX_ED#defineUX_MAX_ED80#endif#ifndefUX_MAX_TD#defineUX_MAX_TD32#endif#ifndefUX_MAX_ISO_TD#defineUX_MAX_ISO_TD2#endif#ifndefUX_HOST_ENUM_THREAD_STACK_SIZE#defineUX_HOST_ENUM_THREAD_STACK_SIZE(2*1024)#endif#ifndefUX_THREAD_STACK_SIZE#defineUX_THREAD_STACK_SIZE(1*1024)#endif#ifndefUX_THREAD_PRIORITY_ENUM#defineUX_THREAD_PRIORITY_ENUM20#endif#ifndefUX_THREAD_PRIORITY_CLASS#defineUX_THREAD_PRIORITY_CLASS20#endif#ifndefUX_THREAD_PRIORITY_KEYBOARD#defineUX_THREAD_PRIORITY_KEYBOARD20#endif#ifndefUX_THREAD_PRIORITY_HCD#defineUX_THREAD_PRIORITY_HCD2#endif#ifndefUX_THREAD_PRIORITY_DCD#defineUX_THREAD_PRIORITY_DCD2#endif#ifndefUX_NO_TIME_SLICE#defineUX_NO_TIME_SLICE0#endif#ifndefUX_MAX_SLAVE_LUN#defineUX_MAX_SLAVE_LUN1#endif#ifndefUX_MAX_HOST_LUN#defineUX_MAX_HOST_LUN1#endif#ifndefUX_HOST_CLASS_STORAGE_MAX_MEDIA#defineUX_HOST_CLASS_STORAGE_MAX_MEDIA1#endif#ifndefUX_SLAVE_REQUEST_CONTROL_MAX_LENGTH#defineUX_SLAVE_REQUEST_CONTROL_MAX_LENGTH256#endif#ifndefUX_SLAVE_REQUEST_DATA_MAX_LENGTH#defineUX_SLAVE_REQUEST_DATA_MAX_LENGTH2048#endif#ifndefUX_USE_IO_INSTRUCTIONS/* Don't use IO instructions if this define is not set. Default to memory mapped. */#defineinpb(a)*((UCHAR*)(a))#defineinpw(a)*((USHORT*)(a))#defineinpl(a)*((ULONG*)(a))#defineoutpb(a,b)*((UCHAR*)(a))=((UCHAR)(b))#defineoutpw(a,b)*((USHORT*)(a))=((USHORT)(b))#defineoutpl(a,b)*((ULONG*)(a))=((ULONG)(b))6 defines#else/* ... *//* Define simple prototypes for non-memory mapped hardware access. */UCHARinpb(ULONG);USHORTinpw(ULONG);ULONGinpl(ULONG);VOIDoutpb(ULONG,UCHAR);VOIDoutpw(ULONG,USHORT);VOIDoutpl(ULONG,ULONG);/* ... */#endif/* Define local delay function for board specific bsps. */#ifdefTI_AM335#defineUX_BSP_SPECIFIC_DELAY_FUNCTION#endif/* Define interrupt lockout constructs to protect the memory allocation/release which could happen under ISR in the device stack. *//* ... */#defineUX_INT_SAVE_AREAunsignedintold_interrupt_posture;#defineUX_DISABLE_INTSold_interrupt_posture=tx_interrupt_control(TX_INT_DISABLE);#defineUX_RESTORE_INTStx_interrupt_control(old_interrupt_posture);/* Define the version ID of USBX. This may be utilized by the application. */#ifdefUX_SYSTEM_INITCHAR_ux_version_id[]="Copyright (c) Microsoft Corporation. All rights reserved. * USBX Generic Version 6.1.10 *";/* ... */#elseexternCHAR_ux_version_id[];#endif/* ... */#endif...
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.