STM32L4xx_HAL_Driver  1.14.0
Peripheral State functions

Peripheral State functions. More...

Functions

HCD_StateTypeDef HAL_HCD_GetState (HCD_HandleTypeDef *hhcd)
 Return the HCD handle state. More...
 
HCD_URBStateTypeDef HAL_HCD_HC_GetURBState (HCD_HandleTypeDef *hhcd, uint8_t chnum)
 Return URB state for a channel. More...
 
uint32_t HAL_HCD_HC_GetXferCount (HCD_HandleTypeDef *hhcd, uint8_t chnum)
 Return the last host transfer size. More...
 
HCD_HCStateTypeDef HAL_HCD_HC_GetState (HCD_HandleTypeDef *hhcd, uint8_t chnum)
 Return the Host Channel state. More...
 
uint32_t HAL_HCD_GetCurrentFrame (HCD_HandleTypeDef *hhcd)
 Return the current Host frame number. More...
 
uint32_t HAL_HCD_GetCurrentSpeed (HCD_HandleTypeDef *hhcd)
 Return the Host enumeration speed. More...
 

Detailed Description

Peripheral State functions.

 ===============================================================================
                      ##### Peripheral State functions #####
 ===============================================================================
    [..]
    This subsection permits to get in run-time the status of the peripheral
    and the data flow.

Function Documentation

◆ HAL_HCD_GetCurrentFrame()

uint32_t HAL_HCD_GetCurrentFrame ( HCD_HandleTypeDef hhcd)

Return the current Host frame number.

Parameters
hhcdHCD handle
Return values
CurrentHost frame number

Definition at line 1123 of file stm32l4xx_hal_hcd.c.

1124 {
1125  return (USB_GetCurrentFrame(hhcd->Instance));
1126 }
uint32_t USB_GetCurrentFrame(USB_OTG_GlobalTypeDef *USBx)
Return Host Current Frame number.

◆ HAL_HCD_GetCurrentSpeed()

uint32_t HAL_HCD_GetCurrentSpeed ( HCD_HandleTypeDef hhcd)

Return the Host enumeration speed.

Parameters
hhcdHCD handle
Return values
Enumerationspeed

Definition at line 1133 of file stm32l4xx_hal_hcd.c.

1134 {
1135  return (USB_GetHostSpeed(hhcd->Instance));
1136 }
uint32_t USB_GetHostSpeed(USB_OTG_GlobalTypeDef *USBx)
Return Host Core speed.

◆ HAL_HCD_GetState()

HCD_StateTypeDef HAL_HCD_GetState ( HCD_HandleTypeDef hhcd)

Return the HCD handle state.

Parameters
hhcdHCD handle
Return values
HALstate

Definition at line 1059 of file stm32l4xx_hal_hcd.c.

1060 {
1061  return hhcd->State;
1062 }

◆ HAL_HCD_HC_GetState()

HCD_HCStateTypeDef HAL_HCD_HC_GetState ( HCD_HandleTypeDef hhcd,
uint8_t  chnum 
)

Return the Host Channel state.

Parameters
hhcdHCD handle
chnumChannel number. This parameter can be a value from 1 to 15
Return values
Hostchannel state This parameter can be one of these values: HC_IDLE/ HC_XFRC/ HC_HALTED/ HC_NYET/ HC_NAK/ HC_STALL/ HC_XACTERR/ HC_BBLERR/ HC_DATATGLERR

Definition at line 1113 of file stm32l4xx_hal_hcd.c.

1114 {
1115  return hhcd->hc[chnum].state;
1116 }

◆ HAL_HCD_HC_GetURBState()

HCD_URBStateTypeDef HAL_HCD_HC_GetURBState ( HCD_HandleTypeDef hhcd,
uint8_t  chnum 
)

Return URB state for a channel.

Parameters
hhcdHCD handle
chnumChannel number. This parameter can be a value from 1 to 15
Return values
URBstate. This parameter can be one of these values: URB_IDLE/ URB_DONE/ URB_NOTREADY/ URB_NYET/ URB_ERROR/ URB_STALL

Definition at line 1078 of file stm32l4xx_hal_hcd.c.

1079 {
1080  return hhcd->hc[chnum].urb_state;
1081 }

◆ HAL_HCD_HC_GetXferCount()

uint32_t HAL_HCD_HC_GetXferCount ( HCD_HandleTypeDef hhcd,
uint8_t  chnum 
)

Return the last host transfer size.

Parameters
hhcdHCD handle
chnumChannel number. This parameter can be a value from 1 to 15
Return values
lasttransfer size in byte

Definition at line 1091 of file stm32l4xx_hal_hcd.c.

1092 {
1093  return hhcd->hc[chnum].xfer_count;
1094 }