LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Mouse.c File Reference
#include "Mouse.h"

Go to the source code of this file.

Functions

static void SetupHardware (void)
 Configures the board hardware and chip peripherals for the demo's functionality.
 
int main (void)
 Main program entry point.
 
void EVENT_USB_Device_Connect (void)
 Event handler for the library USB Connection event.
 
void EVENT_USB_Device_Disconnect (void)
 Event handler for the library USB Disconnection event.
 
void EVENT_USB_Device_ConfigurationChanged (void)
 Event handler for the library USB Configuration Changed event.
 
void EVENT_USB_Device_ControlRequest (void)
 Event handler for the library USB Control Request reception event.
 
void EVENT_USB_Device_StartOfFrame (void)
 Event handler for the USB device Start Of Frame event.
 
bool CALLBACK_HID_Device_CreateHIDReport (USB_ClassInfo_HID_Device_t *const HIDInterfaceInfo, uint8_t *const ReportID, const uint8_t ReportType, void *ReportData, uint16_t *const ReportSize)
 HID class driver callback for the user creation of a HID IN report. This callback may fire in response to either HID class control requests from the host, or by the normal HID endpoint polling procedure. Inside this callback the user is responsible for the creation of the next HID input report to be sent to the host.
 
void CALLBACK_HID_Device_ProcessHIDReport (USB_ClassInfo_HID_Device_t *const HIDInterfaceInfo, const uint8_t ReportID, const uint8_t ReportType, const void *ReportData, const uint16_t ReportSize)
 HID class driver callback for the user processing of a received HID OUT report. This callback may fire in response to either HID class control requests from the host, or by the normal HID endpoint polling procedure. Inside this callback the user is responsible for the processing of the received HID output report from the host.
 

Variables

static uint8_t PrevMouseHIDReportBuffer [sizeof(USB_MouseReport_Data_t)]
 
static USB_ClassInfo_HID_Device_t Mouse_HID_Interface
 

Function Documentation

static void SetupHardware ( void  )
static

Configures the board hardware and chip peripherals for the demo's functionality.

Returns
Nothing

Definition at line 72 of file Mouse.c.

Variable Documentation

USB_ClassInfo_HID_Device_t Mouse_HID_Interface
static
Initial value:
= {
.Config = {
.InterfaceNumber = 0,
.ReportINEndpointNumber = MOUSE_EPNUM,
.ReportINEndpointSize = MOUSE_EPSIZE,
.ReportINEndpointDoubleBank = false,
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
.PortNumber = 0,
},
}

nxpUSBlib HID Class driver interface configuration and state information. This structure is passed to all HID Class driver functions, so that multiple instances of the same class within a device can be differentiated from one another.

Definition at line 46 of file Mouse.c.

uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)]
static

Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver.

Definition at line 40 of file Mouse.c.