Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Implementation of UHI HID Mouse

Class internal implementation.

Data Structures

struct  uhi_hid_mouse_dev_t
 

Index in HID report for usual HID mouse events

#define UHI_HID_MOUSE_BTN   0
 
#define UHI_HID_MOUSE_MOV_X   1
 
#define UHI_HID_MOUSE_MOV_Y   2
 
#define UHI_HID_MOUSE_MOV_SCROLL   3
 

Structure to store information about USB Device HID mouse

static uhi_hid_mouse_dev_t uhi_hid_mouse_dev
 

Internal routines

static void uhi_hid_mouse_start_trans_report (usb_add_t add)
 Starts the reception of the HID mouse report. More...
 
static void uhi_hid_mouse_report_reception (usb_add_t add, usb_ep_t ep, uhd_trans_status_t status, iram_size_t nb_transfered)
 Decodes the HID mouse report received. More...
 

Functions required by UHC

uhc_enum_status_t uhi_hid_mouse_install (uhc_device_t *dev)
 
void uhi_hid_mouse_enable (uhc_device_t *dev)
 
void uhi_hid_mouse_uninstall (uhc_device_t *dev)
 

#define UHI_HID_MOUSE_BTN   0
#define UHI_HID_MOUSE_MOV_SCROLL   3
#define UHI_HID_MOUSE_MOV_X   1
#define UHI_HID_MOUSE_MOV_Y   2

static void uhi_hid_mouse_report_reception ( usb_add_t  add,
usb_ep_t  ep,
uhd_trans_status_t  status,
iram_size_t  nb_transfered 
)
static
static void uhi_hid_mouse_start_trans_report ( usb_add_t  add)
static

Starts the reception of the HID mouse report.

Parameters
addUSB address to use

References uhi_hid_mouse_dev_t::ep_in, uhi_hid_mouse_dev_t::report, uhi_hid_mouse_dev_t::report_size, uhd_ep_run(), and uhi_hid_mouse_report_reception().

Referenced by uhi_hid_mouse_enable(), and uhi_hid_mouse_report_reception().

void uhi_hid_mouse_uninstall ( uhc_device_t dev)

uhi_hid_mouse_dev_t uhi_hid_mouse_dev
static
Initial value:
= {
.dev = NULL,
.report = NULL,
}
#define NULL
Definition: nm_bsp.h:64