Nirvana Jay / Mbed 2 deprecated F7DISCO_Demo

Dependencies:   BSP_DISCO_F746NG_patch mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

USBH_CTLREQ_Private_Functions

USBH_CTLREQ_Private_Functions
[USBH_CTLREQ]

Functions

USBH_StatusTypeDef USBH_Get_DevDesc (USBH_HandleTypeDef *phost, uint8_t length)
 USBH_Get_DevDesc Issue Get Device Descriptor command to the device.
USBH_StatusTypeDef USBH_Get_CfgDesc (USBH_HandleTypeDef *phost, uint16_t length)
 USBH_Get_CfgDesc Issues Configuration Descriptor to the device.
USBH_StatusTypeDef USBH_Get_StringDesc (USBH_HandleTypeDef *phost, uint8_t string_index, uint8_t *buff, uint16_t length)
 USBH_Get_StringDesc Issues string Descriptor command to the device.
USBH_StatusTypeDef USBH_GetDescriptor (USBH_HandleTypeDef *phost, uint8_t req_type, uint16_t value_idx, uint8_t *buff, uint16_t length)
 USBH_GetDescriptor Issues Descriptor command to the device.
USBH_StatusTypeDef USBH_SetAddress (USBH_HandleTypeDef *phost, uint8_t DeviceAddress)
 USBH_SetAddress This command sets the address to the connected device.
USBH_StatusTypeDef USBH_SetCfg (USBH_HandleTypeDef *phost, uint16_t cfg_idx)
 USBH_SetCfg The command sets the configuration value to the connected device.
USBH_StatusTypeDef USBH_SetInterface (USBH_HandleTypeDef *phost, uint8_t ep_num, uint8_t altSetting)
 USBH_SetInterface The command sets the Interface value to the connected device.
USBH_StatusTypeDef USBH_ClrFeature (USBH_HandleTypeDef *phost, uint8_t ep_num)
 USBH_ClrFeature This request is used to clear or disable a specific feature.
USBH_DescHeader_t * USBH_GetNextDesc (uint8_t *pbuf, uint16_t *ptr)
 USBH_GetNextDesc This function return the next descriptor header.
USBH_StatusTypeDef USBH_CtlReq (USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length)
 USBH_CtlReq USBH_CtlReq sends a control request and provide the status after completion of the request.
static void USBH_ParseDevDesc (USBH_DevDescTypeDef *dev_desc, uint8_t *buf, uint16_t length)
 USBH_ParseDevDesc This function Parses the device descriptor.
static void USBH_ParseCfgDesc (USBH_CfgDescTypeDef *cfg_desc, uint8_t *buf, uint16_t length)
 USBH_ParseCfgDesc This function Parses the configuration descriptor.
static void USBH_ParseInterfaceDesc (USBH_InterfaceDescTypeDef *if_descriptor, uint8_t *buf)
 USBH_ParseInterfaceDesc This function Parses the interface descriptor.
static void USBH_ParseEPDesc (USBH_EpDescTypeDef *ep_descriptor, uint8_t *buf)
 USBH_ParseEPDesc This function Parses the endpoint descriptor.
static void USBH_ParseStringDesc (uint8_t *psrc, uint8_t *pdest, uint16_t length)
 USBH_ParseStringDesc This function Parses the string descriptor.
static USBH_StatusTypeDef USBH_HandleControl (USBH_HandleTypeDef *phost)
 USBH_HandleControl Handles the USB control transfer state machine.

Function Documentation

USBH_StatusTypeDef USBH_ClrFeature ( USBH_HandleTypeDef *  phost,
uint8_t  ep_num 
)

USBH_ClrFeature This request is used to clear or disable a specific feature.

Parameters:
phost,:Host Handle
ep_num,:endpoint number
hc_num,:Host channel number
Return values:
USBHStatus

Definition at line 308 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_CtlReq ( USBH_HandleTypeDef *  phost,
uint8_t *  buff,
uint16_t  length 
)

USBH_CtlReq USBH_CtlReq sends a control request and provide the status after completion of the request.

Parameters:
phost,:Host Handle
req,:Setup Request Structure
buff,:data buffer address to store the response
length,:length of the response
Return values:
USBHStatus

Definition at line 531 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_Get_CfgDesc ( USBH_HandleTypeDef *  phost,
uint16_t  length 
)

USBH_Get_CfgDesc Issues Configuration Descriptor to the device.

Once the response received, it parses the configuration descriptor and updates the status.

Parameters:
phost,:Host Handle
length,:Length of the descriptor
Return values:
USBHStatus

Definition at line 137 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_Get_DevDesc ( USBH_HandleTypeDef *  phost,
uint8_t  length 
)

USBH_Get_DevDesc Issue Get Device Descriptor command to the device.

Once the response received, it parses the device descriptor and updates the status.

Parameters:
phost,:Host Handle
length,:Length of the descriptor
Return values:
USBHStatus

Definition at line 112 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_Get_StringDesc ( USBH_HandleTypeDef *  phost,
uint8_t  string_index,
uint8_t *  buff,
uint16_t  length 
)

USBH_Get_StringDesc Issues string Descriptor command to the device.

Once the response received, it parses the string descriptor and updates the status.

Parameters:
phost,:Host Handle
string_index,:String index for the descriptor
buff,:Buffer address for the descriptor
length,:Length of the descriptor
Return values:
USBHStatus

Definition at line 175 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_GetDescriptor ( USBH_HandleTypeDef *  phost,
uint8_t  req_type,
uint16_t  value_idx,
uint8_t *  buff,
uint16_t  length 
)

USBH_GetDescriptor Issues Descriptor command to the device.

Once the response received, it parses the descriptor and updates the status.

Parameters:
phost,:Host Handle
req_type,:Descriptor type
value_idx,:Value for the GetDescriptr request
buff,:Buffer to store the descriptor
length,:Length of the descriptor
Return values:
USBHStatus

Definition at line 204 of file usbh_ctlreq.c.

USBH_DescHeader_t* USBH_GetNextDesc ( uint8_t *  pbuf,
uint16_t *  ptr 
)

USBH_GetNextDesc This function return the next descriptor header.

Parameters:
buf,:Buffer where the cfg descriptor is available
ptr,:data pointer inside the cfg descriptor
Return values:
nextheader

Definition at line 509 of file usbh_ctlreq.c.

static USBH_StatusTypeDef USBH_HandleControl ( USBH_HandleTypeDef *  phost ) [static]

USBH_HandleControl Handles the USB control transfer state machine.

Parameters:
phost,:Host Handle
Return values:
USBHStatus

Definition at line 581 of file usbh_ctlreq.c.

static void USBH_ParseCfgDesc ( USBH_CfgDescTypeDef *  cfg_desc,
uint8_t *  buf,
uint16_t  length 
) [static]

USBH_ParseCfgDesc This function Parses the configuration descriptor.

Parameters:
cfg_desc,:Configuration Descriptor address
buf,:Buffer where the source descriptor is available
length,:Length of the descriptor
Return values:
None

Definition at line 366 of file usbh_ctlreq.c.

static void USBH_ParseDevDesc ( USBH_DevDescTypeDef *  dev_desc,
uint8_t *  buf,
uint16_t  length 
) [static]

USBH_ParseDevDesc This function Parses the device descriptor.

Parameters:
dev_desc,:device_descriptor destination address
buf,:Buffer where the source descriptor is available
length,:Length of the descriptor
Return values:
None

Definition at line 333 of file usbh_ctlreq.c.

static void USBH_ParseEPDesc ( USBH_EpDescTypeDef *  ep_descriptor,
uint8_t *  buf 
) [static]

USBH_ParseEPDesc This function Parses the endpoint descriptor.

Parameters:
ep_descriptor,:Endpoint descriptor destination address
buf,:Buffer where the parsed descriptor stored
Return values:
None

Definition at line 452 of file usbh_ctlreq.c.

static void USBH_ParseInterfaceDesc ( USBH_InterfaceDescTypeDef *  if_descriptor,
uint8_t *  buf 
) [static]

USBH_ParseInterfaceDesc This function Parses the interface descriptor.

Parameters:
if_descriptor: Interface descriptor destination
buf,:Buffer where the descriptor data is available
Return values:
None

Definition at line 431 of file usbh_ctlreq.c.

static void USBH_ParseStringDesc ( uint8_t *  psrc,
uint8_t *  pdest,
uint16_t  length 
) [static]

USBH_ParseStringDesc This function Parses the string descriptor.

Parameters:
psrc,:Source pointer containing the descriptor data
pdest,:Destination address pointer
length,:Length of the descriptor
Return values:
None

Definition at line 472 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_SetAddress ( USBH_HandleTypeDef *  phost,
uint8_t  DeviceAddress 
)

USBH_SetAddress This command sets the address to the connected device.

Parameters:
phost,:Host Handle
DeviceAddress,:Device address to assign
Return values:
USBHStatus

Definition at line 236 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_SetCfg ( USBH_HandleTypeDef *  phost,
uint16_t  cfg_idx 
)

USBH_SetCfg The command sets the configuration value to the connected device.

Parameters:
phost,:Host Handle
cfg_idx,:Configuration value
Return values:
USBHStatus

Definition at line 260 of file usbh_ctlreq.c.

USBH_StatusTypeDef USBH_SetInterface ( USBH_HandleTypeDef *  phost,
uint8_t  ep_num,
uint8_t  altSetting 
)

USBH_SetInterface The command sets the Interface value to the connected device.

Parameters:
phost,:Host Handle
altSetting,:Interface value
Return values:
USBHStatus

Definition at line 283 of file usbh_ctlreq.c.