![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|
Data Structures | |
| struct | stc_usbdevice_keyboard |
Macros | |
| #define | MODIFIERKEY_LEFT_CTRL (1 << 0) |
| #define | MODIFIERKEY_LEFT_SHIFT (1 << 1) |
| #define | MODIFIERKEY_LEFT_ALT (1 << 2) |
| #define | MODIFIERKEY_LEFT_GUI (1 << 3) |
| #define | MODIFIERKEY_RIGHT_CTRL (1 << 4) |
| #define | MODIFIERKEY_RIGHT_SHIFT (1 << 5) |
| #define | MODIFIERKEY_RIGHT_ALT (1 << 6) |
| #define | MODIFIERKEY_RIGHT_GUI (1 << 7) |
Typedefs | |
| typedef struct stc_usbdevice_keyboard | stc_usbdevice_keyboard_t |
Functions | |
| void | UsbDeviceHidKeyboard_Init (stc_usbn_t *pstcUsb) |
| void | UsbDeviceHidKeyboard_SetModifierKey (uint8_t u8ModifierKey) |
| void | UsbDeviceHidKeyboard_ClearModifierKey (uint8_t u8ModifierKey) |
| void | UsbDeviceHidKeyboard_KeyPress (uint8_t u8Index, uint8_t u8KeyCode) |
| void | UsbDeviceHidKeyboard_KeyDown (uint8_t u8Index, uint8_t u8KeyCode) |
| void | UsbDeviceHidKeyboard_KeyUp (uint8_t u8Index, uint8_t u8KeyCode) |
| boolean_t | UsbDeviceHidKeyboard_IsConnected (void) |
Variables | |
| const uint8_t | u8AsciiToKeyCode [] |
Provided functions of USB Device Keyboard module:
Used to enumerate a keyboard device
| #define MODIFIERKEY_LEFT_ALT (1 << 2) |
Definition at line 111 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_LEFT_CTRL (1 << 0) |
Definition at line 105 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_LEFT_GUI (1 << 3) |
Definition at line 114 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_LEFT_SHIFT (1 << 1) |
Definition at line 108 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_RIGHT_ALT (1 << 6) |
Definition at line 124 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_RIGHT_CTRL (1 << 4) |
Definition at line 118 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_RIGHT_GUI (1 << 7) |
Definition at line 127 of file UsbDeviceHidKeyboard.h.
| #define MODIFIERKEY_RIGHT_SHIFT (1 << 5) |
Definition at line 121 of file UsbDeviceHidKeyboard.h.
| typedef struct stc_usbdevice_keyboard stc_usbdevice_keyboard_t |
| void UsbDeviceHidKeyboard_ClearModifierKey | ( | uint8_t | u8ModifierKey | ) |
Clear modifier keys
| u8ModifierKey | Bitmask of modifier keys: MODIFIERKEY_LEFT_CTRL MODIFIERKEY_LEFT_SHIFT MODIFIERKEY_LEFT_ALT MODIFIERKEY_LEFT_GUI MODIFIERKEY_RIGHT_CTRL MODIFIERKEY_RIGHT_SHIFT MODIFIERKEY_RIGHT_ALT MODIFIERKEY_RIGHT_GUI |
Definition at line 478 of file UsbDeviceHidKeyboard.c.
References pu8KeyboardData, SendData(), and UsbPOLL.

| void UsbDeviceHidKeyboard_Init | ( | stc_usbn_t * | pstcUsb | ) |
Definition at line 373 of file UsbDeviceHidKeyboard.c.
References ConfCallback(), stc_usbdevice_class_config::pfnConfCallback, stc_usbdevice_class_config::pfnConnectionCallback, stc_usbdevice_class_config::pfnDisconnectionCallback, stc_usbdevice_class_config::pfnSetupRequestCallback, stc_usbdevice_endpoint_config::pstcEndpointBuffer, pstcUsbHandle, stcEndpointBufferIN, stc_usbdevice_endpoint_config::u8EndpointAddress, stc_usbdevice_class_config::u8InterfaceClass, stc_usbdevice_class_config::u8InterfaceNumber, stc_usbdevice_class_config::u8InterfaceProtocoll, stc_usbdevice_class_config::u8InterfaceSubClass, USBDESCR_ENDPOINT, UsbDevice_RegisterVendorClass(), and UsbDevice_SetupEndpoint().

| boolean_t UsbDeviceHidKeyboard_IsConnected | ( | void | ) |
Return connected state
Definition at line 539 of file UsbDeviceHidKeyboard.c.
References bReady.
| void UsbDeviceHidKeyboard_KeyDown | ( | uint8_t | u8Index, |
| uint8_t | u8KeyCode | ||
| ) |
Press key (Down)
| u8Index | 0..5 (parallel pressed keys) |
| u8KeyCode | Keycode |
Definition at line 510 of file UsbDeviceHidKeyboard.c.
References pu8KeyboardData, SendData(), and UsbPOLL.

| void UsbDeviceHidKeyboard_KeyPress | ( | uint8_t | u8Index, |
| uint8_t | u8KeyCode | ||
| ) |
Press key (Down - Up)
| u8Index | 0..5 (parallel pressed keys) |
| u8KeyCode | Keycode |
Definition at line 493 of file UsbDeviceHidKeyboard.c.
References pu8KeyboardData, SendData(), and UsbPOLL.

| void UsbDeviceHidKeyboard_KeyUp | ( | uint8_t | u8Index, |
| uint8_t | u8KeyCode | ||
| ) |
Press key (Up)
| u8Index | 0..5 (parallel pressed keys) |
| u8KeyCode | Keycode |
Definition at line 525 of file UsbDeviceHidKeyboard.c.
References pu8KeyboardData, SendData(), and UsbPOLL.

| void UsbDeviceHidKeyboard_SetModifierKey | ( | uint8_t | u8ModifierKey | ) |
Set modifier keys
| u8ModifierKey | Bitmask of modifier keys: MODIFIERKEY_LEFT_CTRL MODIFIERKEY_LEFT_SHIFT MODIFIERKEY_LEFT_ALT MODIFIERKEY_LEFT_GUI MODIFIERKEY_RIGHT_CTRL MODIFIERKEY_RIGHT_SHIFT MODIFIERKEY_RIGHT_ALT MODIFIERKEY_RIGHT_GUI |
Definition at line 457 of file UsbDeviceHidKeyboard.c.
References pu8KeyboardData, SendData(), and UsbPOLL.

| const uint8_t u8AsciiToKeyCode[] |
Definition at line 79 of file UsbDeviceHidKeyboard.c.