TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

Library Functions. More...

Functions

TM_USB_Result_t TM_USB_Init (void)
 Initializes USB for future work. More...
 
TM_USB_Result_t TM_USB_InitFS (void)
 Initializes USB Full Speed mode. More...
 
TM_USB_Result_t TM_USB_InitHS (void)
 Initializes USB High Speed mode. More...
 
void TM_USB_DriveVBUSCallback (TM_USB_t USB_Mode, uint8_t state)
 Enables or disabled VBUS (Power supply) for USB communication. More...
 

Detailed Description

Library Functions.

Function Documentation

void TM_USB_DriveVBUSCallback ( TM_USB_t  USB_Mode,
uint8_t  state 
)

Enables or disabled VBUS (Power supply) for USB communication.

Note
This functions has sense only if you have external hardware which can be controlled to enable/disable VBUS
Functions has sense only when HOST mode is used with USB
Parameters
USB_ModeUSB Mode where VBUS should be enabled or disabled
stateState to use for VBUS
  • 0: VBUS should be disabled, USB deactivated
  • 1: VBUS should be enabled, USB activated
Return values
None
Note
With __weak parameter to prevent link errors if not defined by user
TM_USB_Result_t TM_USB_Init ( void  )

Initializes USB for future work.

Note
This function must always be called at the beginning in case USB will be used in application
Parameters
None
Return values
Memberof TM_USB_Result_t enumeration
TM_USB_Result_t TM_USB_InitFS ( void  )

Initializes USB Full Speed mode.

Note
This functions is called from USB stack when needed, no need for manual calling
Parameters
None
Return values
Memberof TM_USB_Result_t enumeration
TM_USB_Result_t TM_USB_InitHS ( void  )

Initializes USB High Speed mode.

Note
This functions is called from USB stack when needed, no need for manual calling
Parameters
None
Return values
Memberof TM_USB_Result_t enumeration