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
TM_USBH_HID_Functions

Library Functions. More...

Functions

TM_USBH_Result_t TM_USBH_HID_Init (TM_USB_t USB_Mode)
 Initializes USB HOST HID class for specific USB mode (PORT) More...
 
TM_USBH_HID_t TM_USBH_HID_GetConnected (TM_USB_t USB_Mode)
 Gets connected device on specific USB port of type HID DEVICE. More...
 
TM_USBH_HID_t TM_USBH_HID_GetKeyboard (TM_USB_t USB_Mode, TM_USBH_HID_Keyboard_t *KeyboardStruct)
 Gets keyboard pressed buttons and ASCII value for pressed button. More...
 
TM_USBH_HID_t TM_USBH_HID_GetMouse (TM_USB_t USB_Mode, TM_USBH_HID_Mouse_t *MouseStruct)
 Gets mouse pressed buttons and X/Y cursor positions. More...
 

Detailed Description

Library Functions.

Function Documentation

TM_USBH_HID_t TM_USBH_HID_GetConnected ( TM_USB_t  USB_Mode)

Gets connected device on specific USB port of type HID DEVICE.

Parameters
USB_ModeUSB mode where to check for connected HID device. This parameter can be a value of TM_USB_t enumeration
Return values
Memberof TM_USBH_HID_t enumeration
TM_USBH_HID_t TM_USBH_HID_GetKeyboard ( TM_USB_t  USB_Mode,
TM_USBH_HID_Keyboard_t KeyboardStruct 
)

Gets keyboard pressed buttons and ASCII value for pressed button.

Parameters
USB_ModeUSB mode where read keyboard data. This parameter can be a value of TM_USB_t enumeration
*KeyboardStructPointer to TM_USBH_HID_Keyboard_t where values will be stored
Return values
Memberof TM_USBH_HID_t enumeration.
  • TM_USBH_HID_Keyboard will be returned if data are valid
TM_USBH_HID_t TM_USBH_HID_GetMouse ( TM_USB_t  USB_Mode,
TM_USBH_HID_Mouse_t MouseStruct 
)

Gets mouse pressed buttons and X/Y cursor positions.

Parameters
USB_ModeUSB mode where read mouse data. This parameter can be a value of TM_USB_t enumeration
*MouseStructPointer to TM_USBH_HID_Mouse_t where values will be stored
Return values
Memberof TM_USBH_HID_t enumeration.
  • TM_USBH_HID_Mouse will be returned if data are valid
TM_USBH_Result_t TM_USBH_HID_Init ( TM_USB_t  USB_Mode)

Initializes USB HOST HID class for specific USB mode (PORT)

Parameters
USB_ModeUSB mode where HID HOST class will be registered. This parameter can be a value of TM_USB_t enumeration
Return values
Memberof TM_USBH_Result_t enumeration