Download HAL Driver User Manual

Transcript
UM1725
HAL HCD Generic Driver
22.2.6
Initialization and de-initialization functions
22.2.6.1
HAL_HCD_Init
22.2.6.2
Function Name
HAL_StatusTypeDef HAL_HCD_Init ( HCD_HandleTypeDef *
hhcd)
Function Description
Initialize the host driver.
Parameters

hhcd : HCD handle
Return values

HAL status
Notes

None.
HAL_HCD_HC_Init
Function Name
HAL_StatusTypeDef HAL_HCD_HC_Init ( HCD_HandleTypeDef
* hhcd, uint8_t ch_num, uint8_t epnum, uint8_t dev_address,
uint8_t speed, uint8_t ep_type, uint16_t mps)
Function Description
Initialize a host channel.
Parameters







hhcd : HCD handle
ch_num : Channel number. This parameter can be a value
from 1 to 15
epnum : Endpoint number. This parameter can be a value
from 1 to 15
dev_address : : Current device address This parameter can
be a value from 0 to 255
speed : Current device speed. This parameter can be one of
these values: HCD_SPEED_HIGH: High speed mode,
HCD_SPEED_FULL: Full speed mode, HCD_SPEED_LOW:
Low speed mode
ep_type : Endpoint Type. This parameter can be one of
these values: EP_TYPE_CTRL: Control type,
EP_TYPE_ISOC: Isochrounous type, EP_TYPE_BULK: Bulk
type, EP_TYPE_INTR: Interrupt type
mps : Max Packet Size. This parameter can be a value from
0 to 32K
Return values

HAL status
Notes

None.
DocID025834 Rev 1
383/865