Nut/OS  5.0.5
API Reference
usb_core.h File Reference
#include <stdint.h>
Include dependency graph for usb_core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  OneDescriptor
struct  _ENDPOINT_INFO
struct  _DEVICE
union  uint16_t_uint8_t
struct  uint16_t_uint8_t::BW
struct  _DEVICE_INFO
struct  _DEVICE_PROP
struct  _USER_STANDARD_REQUESTS

Defines

#define __IO   volatile
#define Type_Recipient   (pInformation->USBbmRequestType & (REQUEST_TYPE | RECIPIENT))
#define Usb_rLength   Usb_wLength
#define Usb_rOffset   Usb_wOffset
#define USBwValue   USBwValues.w
#define USBwValue0   USBwValues.bw.bb0
#define USBwValue1   USBwValues.bw.bb1
#define USBwIndex   USBwIndexs.w
#define USBwIndex0   USBwIndexs.bw.bb0
#define USBwIndex1   USBwIndexs.bw.bb1
#define USBwLength   USBwLengths.w
#define USBwLength0   USBwLengths.bw.bb0
#define USBwLength1   USBwLengths.bw.bb1

Typedefs

typedef enum _CONTROL_STATE CONTROL_STATE
typedef struct OneDescriptor ONE_DESCRIPTOR
typedef struct OneDescriptorPONE_DESCRIPTOR
typedef enum _RESULT RESULT
typedef struct _ENDPOINT_INFO ENDPOINT_INFO
typedef struct _DEVICE DEVICE
typedef struct _DEVICE_INFO DEVICE_INFO
typedef struct _DEVICE_PROP DEVICE_PROP
typedef struct
_USER_STANDARD_REQUESTS 
USER_STANDARD_REQUESTS

Enumerations

enum  _CONTROL_STATE {
  WAIT_SETUP, SETTING_UP, IN_DATA, OUT_DATA,
  LAST_IN_DATA, LAST_OUT_DATA, WAIT_STATUS_IN, WAIT_STATUS_OUT,
  STALLED, PAUSE
}
enum  _RESULT { USB_SUCCESS = 0, USB_ERROR, USB_UNSUPPORT, USB_NOT_READY }

Functions

uint8_t Setup0_Process (void)
uint8_t Post0_Process (void)
uint8_t Out0_Process (void)
uint8_t In0_Process (void)
RESULT Standard_SetEndPointFeature (void)
RESULT Standard_SetDeviceFeature (void)
uint8_tStandard_GetConfiguration (uint16_t Length)
RESULT Standard_SetConfiguration (void)
uint8_tStandard_GetInterface (uint16_t Length)
RESULT Standard_SetInterface (void)
uint8_tStandard_GetDescriptorData (uint16_t Length, PONE_DESCRIPTOR pDesc)
uint8_tStandard_GetStatus (uint16_t Length)
RESULT Standard_ClearFeature (void)
void SetDeviceAddress (uint8_t)
void NOP_Process (void)

Variables

DEVICE_PROP Device_Property
USER_STANDARD_REQUESTS User_Standard_Requests
DEVICE Device_Table
DEVICE_INFO Device_Info
__IO uint16_t SaveRState
__IO uint16_t SaveTState

Define Documentation

#define __IO   volatile
#define Type_Recipient   (pInformation->USBbmRequestType & (REQUEST_TYPE | RECIPIENT))
#define Usb_rLength   Usb_wLength
#define Usb_rOffset   Usb_wOffset
#define USBwValue   USBwValues.w
#define USBwValue0   USBwValues.bw.bb0
#define USBwValue1   USBwValues.bw.bb1
#define USBwIndex   USBwIndexs.w
#define USBwIndex0   USBwIndexs.bw.bb0
#define USBwIndex1   USBwIndexs.bw.bb1
#define USBwLength   USBwLengths.w
#define USBwLength0   USBwLengths.bw.bb0
#define USBwLength1   USBwLengths.bw.bb1

Typedef Documentation

typedef struct OneDescriptor ONE_DESCRIPTOR
typedef struct OneDescriptor * PONE_DESCRIPTOR
typedef enum _RESULT RESULT
typedef struct _ENDPOINT_INFO ENDPOINT_INFO
typedef struct _DEVICE DEVICE
typedef struct _DEVICE_INFO DEVICE_INFO
typedef struct _DEVICE_PROP DEVICE_PROP

Enumeration Type Documentation

Enumerator:
WAIT_SETUP 
SETTING_UP 
IN_DATA 
OUT_DATA 
LAST_IN_DATA 
LAST_OUT_DATA 
WAIT_STATUS_IN 
WAIT_STATUS_OUT 
STALLED 
PAUSE 
enum _RESULT
Enumerator:
USB_SUCCESS 
USB_ERROR 
USB_UNSUPPORT 
USB_NOT_READY 

Function Documentation

uint8_t Setup0_Process ( void  )

References ByteSwap(), _DEVICE_INFO::ControlState, ENDP0, OTGD_FS_EP0StartXfer(), OTGD_FS_PCD_GetOutEP(), PAUSE, pInformation, Post0_Process(), SETTING_UP, _DEVICE_INFO::USBbmRequestType, _DEVICE_INFO::USBbRequest, and USB_OTG_ep::xfer_buff.

Referenced by OTGD_FS_Handle_OutEP_ISR().

Here is the call graph for this function:

uint8_t Post0_Process ( void  )

References _DEVICE_INFO::ControlState, Device_Property, ENDP0, EP_RX_STALL, EP_TX_STALL, EP_TX_VALID, IN_DATA, USB_OTG_ep::is_in, _DEVICE_PROP::MaxPacketSize, OTGD_FS_EP0StartXfer(), OTGD_FS_PCD_GetInEP(), OUT_DATA, PAUSE, pInformation, SetEPRxCount(), STALLED, vSetEPRxStatus, vSetEPTxStatus, WAIT_STATUS_IN, and WAIT_STATUS_OUT.

Referenced by In0_Process(), Out0_Process(), and Setup0_Process().

Here is the call graph for this function:

uint8_t Out0_Process ( void  )

References _DEVICE_INFO::ControlState, IN_DATA, LAST_IN_DATA, LAST_OUT_DATA, OUT_DATA, pInformation, Post0_Process(), pProperty, _DEVICE_PROP::Process_Status_OUT, STALLED, and WAIT_STATUS_OUT.

Referenced by OTGD_FS_Handle_OutEP_ISR().

Here is the call graph for this function:

uint8_t In0_Process ( void  )
void SetDeviceAddress ( uint8_t  )

References OTGD_FS_PCD_EP_SetAddress().

Referenced by In0_Process().

Here is the call graph for this function:

void NOP_Process ( void  )

Variable Documentation