SAMV71 Xplained Ultra Software Package 1.4

HIDDMouseDriver.h File Reference

#include <USBRequests.h>
#include <HIDDescriptors.h>
#include <HIDRequests.h>
#include <USBDDriver.h>

Go to the source code of this file.

Data Structures

struct  _HIDDMouseDriverConfigurationDescriptors
struct  _HIDDMouseInputReport

Defines

#define HIDDMouse_LEFT_BUTTON   (1 << 0)
#define HIDDMouse_RIGHT_BUTTON   (1 << 1)
#define HIDDMouse_MIDDLE_BUTTON   (1 << 2)
#define HIDDMouseDriver_REPORTDESCRIPTORSIZE   50

Functions

struct
_HIDDMouseDriverConfigurationDescriptors 
__attribute__ ((__packed__)) HIDDMouseDriverConfigurationDescriptors
void HIDDMouseDriver_Initialize (const USBDDriverDescriptors *pDescriptors)
void HIDDMouseDriver_ConfigurationChangedHandler (uint8_t cfgnum)
void HIDDMouseDriver_RequestHandler (const USBGenericRequest *request)
uint8_t HIDDMouseDriver_ChangePoints (uint8_t bmButtons, int8_t deltaX, int8_t deltaY)
void HIDDMouseDriver_RemoteWakeUp (void)

Variables

USBConfigurationDescriptor configuration
USBInterfaceDescriptor interface
HIDDescriptor1 hid
USBEndpointDescriptor interruptIn
uint8_t bmButtons
int8_t bX
int8_t bY

Detailed Description

Purpose

Definition of methods for using a HID mouse device driver.

Usage

  1. Re-implement the USBDCallbacks_RequestReceived callback to forward requests to HIDDMouseDriver_RequestHandler. This is done automatically unless the NOAUTOCALLBACK symbol is defined during compilation.
  2. Initialize the driver using HIDDMouseDriver_Initialize. The USB driver is automatically initialized by this method.
  3. Call the HIDDMouseDriver_ChangePoints method when one or more keys are pressed/released.

Definition in file HIDDMouseDriver.h.


Variable Documentation

uint8_t bmButtons

Bitmap state of three mouse buttons.

Definition at line 131 of file HIDDMouseDriver.h.

int8_t bX

Pointer displacement along the X axis.

Definition at line 132 of file HIDDMouseDriver.h.

int8_t bY

Pointer displacement along the Y axis.

Definition at line 133 of file HIDDMouseDriver.h.

USBConfigurationDescriptor configuration

Configuration descriptor.

Definition at line 120 of file HIDDMouseDriver.h.

HIDDescriptor1 hid

HID descriptor.

Definition at line 124 of file HIDDMouseDriver.h.

USBInterfaceDescriptor interface

Interface descriptor.

Definition at line 122 of file HIDDMouseDriver.h.

USBEndpointDescriptor interruptIn

Interrupt IN endpoint descriptor.

Definition at line 126 of file HIDDMouseDriver.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines