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

Go to the source code of this file.

Functions

static void ConfCallback (stc_usbn_t *pstcUsb)
 Configuration change callback, used to see if configuration is set or cleared. More...
 
void UsbDeviceHidMouse_Init (stc_usbn_t *pstcUsb)
 
static boolean_t SendData (uint8_t *pu8Buffer, uint32_t u32DataSize, en_usbsend_mode_t enMode)
 
void UsbDeviceHidMouse_Move (int8_t i8X, int8_t i8Y)
 
void UsbDeviceHidMouse_LeftClick (void)
 
void UsbDeviceHidMouse_LeftDoubleClick (void)
 
void UsbDeviceHidMouse_LeftDown (void)
 
void UsbDeviceHidMouse_LeftUp (void)
 
void UsbDeviceHidMouse_RightClick (void)
 
void UsbDeviceHidMouse_RightDoubleClick (void)
 
void UsbDeviceHidMouse_RightDown (void)
 
void UsbDeviceHidMouse_RightUp (void)
 
void UsbDeviceHidMouse_Scroll (int8_t i8Scroll)
 
boolean_t UsbDeviceHidMouse_IsConnected (void)
 

Variables

static uint8_t DataSentFlags = 0
 
static uint8_t pu8MouseData [4]
 
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 Mouse Module description

History:

  • 2013-10-14 1.1 MSc PDL support added

Definition in file UsbDeviceHidMouse.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 114 of file UsbDeviceHidMouse.c.

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

Referenced by UsbDeviceHidMouse_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 180 of file UsbDeviceHidMouse.c.

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

Referenced by UsbDeviceHidMouse_LeftDown(), UsbDeviceHidMouse_LeftUp(), UsbDeviceHidMouse_Move(), UsbDeviceHidMouse_RightDown(), UsbDeviceHidMouse_RightUp(), and UsbDeviceHidMouse_Scroll().

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 86 of file UsbDeviceHidMouse.c.

Referenced by ConfCallback(), and UsbDeviceHidMouse_IsConnected().

uint8_t DataSentFlags = 0
static

Definition at line 81 of file UsbDeviceHidMouse.c.

Referenced by SendData().

stc_usbn_endpoint_data_t* pstcEndpointIN
static

Definition at line 83 of file UsbDeviceHidMouse.c.

stc_usbn_t* pstcUsbHandle = NULL
static

Definition at line 85 of file UsbDeviceHidMouse.c.

Referenced by SendData(), and UsbDeviceHidMouse_Init().

stc_usbn_endpoint_buffer_t stcEndpointBufferIN
static

Definition at line 84 of file UsbDeviceHidMouse.c.

Referenced by UsbDeviceHidMouse_Init().