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_stm32_usb_host_hid.h
1 
37 #ifndef TM_USBH_HID_H
38 #define TM_USBH_HID_H 100
39 
40 /* C++ detection */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
80 #include "stm32fxxx_hal.h"
81 #include "defines.h"
82 #include "tm_stm32_usb.h"
83 #include "tm_stm32_usb_host.h"
84 #include "usbh_hid.h"
85 
91 /* Macros here */
105 typedef enum _TM_USBH_HID_t {
109 } TM_USBH_HID_t;
110 
114 typedef struct _TM_USBH_HID_Keyboard_t {
115  uint8_t Status;
116  union {
117  struct {
118  uint8_t LCtrl:1;
119  uint8_t LShift:1;
120  uint8_t LAlt:1;
121  uint8_t LGUI:1;
122  uint8_t RCtrl:1;
123  uint8_t RShift:1;
124  uint8_t RAlt:1;
125  uint8_t RGUI:1;
126  uint8_t Ctrl:1;
127  uint8_t Shift:1;
128  uint8_t Alt:1;
129  uint8_t GUI:1;
130  } S;
131  uint16_t SpecialVal;
132  } Special;
133  uint8_t Keys[6];
134  uint8_t C;
136 
140 typedef struct _TM_USBH_HID_Mouse_t {
141  uint16_t AbsoluteX;
142  uint16_t AbsoluteY;
143  int8_t RelativeX;
144  int8_t RelativeY;
145  uint8_t Buttons[3];
147 
164 
171 
179 
187 
200 /* C++ detection */
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif
uint8_t RAlt
Definition: tm_stm32_usb_host_hid.h:124
uint8_t LAlt
Definition: tm_stm32_usb_host_hid.h:120
uint8_t Status
Definition: tm_stm32_usb_host_hid.h:115
uint8_t LShift
Definition: tm_stm32_usb_host_hid.h:119
Definition: tm_stm32_usb_host_hid.h:106
uint8_t RShift
Definition: tm_stm32_usb_host_hid.h:123
TM_USBH_HID_t TM_USBH_HID_GetConnected(TM_USB_t USB_Mode)
Gets connected device on specific USB port of type HID DEVICE.
uint8_t GUI
Definition: tm_stm32_usb_host_hid.h:129
Definition: tm_stm32_usb_host_hid.h:107
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.
TM_USB_t
USB modes enumeration.
Definition: tm_stm32_usb.h:351
uint8_t Keys[6]
Definition: tm_stm32_usb_host_hid.h:133
_TM_USBH_HID_t
USB host HID types.
Definition: tm_stm32_usb_host_hid.h:105
enum _TM_USBH_HID_t TM_USBH_HID_t
USB host HID types.
USB HID Host keyboard structure.
Definition: tm_stm32_usb_host_hid.h:114
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.
struct _TM_USBH_HID_Keyboard_t::@8::@9 S
TM_USBH_Result_t TM_USBH_HID_Init(TM_USB_t USB_Mode)
Initializes USB HOST HID class for specific USB mode (PORT)
struct _TM_USBH_HID_Keyboard_t TM_USBH_HID_Keyboard_t
USB HID Host keyboard structure.
int8_t RelativeX
Definition: tm_stm32_usb_host_hid.h:143
uint8_t LGUI
Definition: tm_stm32_usb_host_hid.h:121
int8_t RelativeY
Definition: tm_stm32_usb_host_hid.h:144
uint8_t Alt
Definition: tm_stm32_usb_host_hid.h:128
uint8_t Buttons[3]
Definition: tm_stm32_usb_host_hid.h:145
uint16_t SpecialVal
Definition: tm_stm32_usb_host_hid.h:131
uint16_t AbsoluteY
Definition: tm_stm32_usb_host_hid.h:142
Definition: tm_stm32_usb_host_hid.h:108
uint16_t AbsoluteX
Definition: tm_stm32_usb_host_hid.h:141
uint8_t RCtrl
Definition: tm_stm32_usb_host_hid.h:122
struct _TM_USBH_HID_Mouse_t TM_USBH_HID_Mouse_t
USB HID Host mouse structure.
uint8_t C
Definition: tm_stm32_usb_host_hid.h:134
uint8_t RGUI
Definition: tm_stm32_usb_host_hid.h:125
uint8_t Ctrl
Definition: tm_stm32_usb_host_hid.h:126
uint8_t LCtrl
Definition: tm_stm32_usb_host_hid.h:118
uint8_t Shift
Definition: tm_stm32_usb_host_hid.h:127
USB HID Host mouse structure.
Definition: tm_stm32_usb_host_hid.h:140
TM_USBH_Result_t
USB Host result enumeration.
Definition: tm_stm32_usb_host.h:121