PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
UsbDeviceHidKeyboard.c File Reference
Include dependency graph for UsbDeviceHidKeyboard.c:

Go to the source code of this file.

Functions

static boolean_t SendData (uint8_t *pu8Buffer, uint32_t u32DataSize, en_usbsend_mode_t enMode)
 
static void ConfCallback (stc_usbn_t *pstcUsb)
 Configuration change callback, used to see if configuration is set or cleared. More...
 
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 []
 
static uint8_t DataSentFlags = 0
 
static uint8_t pu8KeyboardData [8] = {0,0,0,0,0,0,0,0}
 
static stc_usbn_endpoint_data_t * pstcEndpointIN
 
static stc_usbn_endpoint_buffer_t stcEndpointBufferIN
 
static stc_usbn_t * pstcUsbHandle = NULL
 
static boolean_t bReady = FALSE
 

Detailed Description

CONST USB_ASSISTANT_OFF

A detailed description is available at USB Device Keyboard Module description

History:

  • 2013-05-08 1.0 MSc First Version
  • 2013-10-14 1.1 MSc PDL support added

Definition in file UsbDeviceHidKeyboard.c.

Function Documentation

static void ConfCallback ( stc_usbn_t *  pstcUsb)
static

Configuration change callback, used to see if configuration is set or cleared.

Parameters
pstcUsbPointer to USB instance
Returns
none

Definition at line 358 of file UsbDeviceHidKeyboard.c.

References bReady, FALSE, TRUE, UsbConfigured, and UsbDevice_GetStatus().

Referenced by UsbDeviceHidKeyboard_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

static boolean_t SendData ( uint8_t *  pu8Buffer,
uint32_t  u32DataSize,
en_usbsend_mode_t  enMode 
)
static

Is called from main application to send data via endpoint

Parameters
pu8BufferBuffer to send
u32DataSizeBuffersize
enModepolled sending, interrupt sending or DMA
Returns
1: if succesful, 0: if usb was not ready

Definition at line 424 of file UsbDeviceHidKeyboard.c.

References DataSentFlags, FALSE, pstcUsbHandle, TRUE, UsbConfigured, UsbDevice_GetStatus(), UsbDevice_SendData(), and UsbPOLL.

Referenced by UsbDeviceHidKeyboard_ClearModifierKey(), UsbDeviceHidKeyboard_KeyDown(), UsbDeviceHidKeyboard_KeyPress(), UsbDeviceHidKeyboard_KeyUp(), and UsbDeviceHidKeyboard_SetModifierKey().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

boolean_t bReady = FALSE
static

Definition at line 342 of file UsbDeviceHidKeyboard.c.

Referenced by ConfCallback(), and UsbDeviceHidKeyboard_IsConnected().

uint8_t DataSentFlags = 0
static

Definition at line 337 of file UsbDeviceHidKeyboard.c.

Referenced by SendData().

stc_usbn_endpoint_data_t* pstcEndpointIN
static

Definition at line 339 of file UsbDeviceHidKeyboard.c.

stc_usbn_t* pstcUsbHandle = NULL
static

Definition at line 341 of file UsbDeviceHidKeyboard.c.

Referenced by SendData(), and UsbDeviceHidKeyboard_Init().

stc_usbn_endpoint_buffer_t stcEndpointBufferIN
static

Definition at line 340 of file UsbDeviceHidKeyboard.c.

Referenced by UsbDeviceHidKeyboard_Init().