USB Device Interface (UDI) for Human Interface Device Mouse (HID mouse) provides an interface for the configuration and management of USB HID mouse device.
The outline of this documentation is as follows:
For more details for Atmel® Software Framework (ASF) USB Device Stack and USB Device HID Mouse, refer to following application notes:
Data Structures | |
struct | udi_hid_mouse_desc_t |
Interface descriptor structure for HID mouse. More... | |
struct | udi_hid_mouse_report_desc_t |
Report descriptor for HID mouse. More... | |
Interface with USB Device Core (UDC) | |
UDC_DESC_STORAGE udi_api_t | udi_api_hid_mouse |
Global structure which contains standard UDI API for UDC. More... | |
USB Interface Descriptors | |
The following structures provide predefined USB interface descriptors. It must be used to define the final USB descriptors. | |
#define | UDI_HID_MOUSE_STRING_ID 0 |
By default no string associated to this interface. More... | |
#define | UDI_HID_MOUSE_EP_SIZE 8 |
HID mouse endpoints size. More... | |
#define | UDI_HID_MOUSE_DESC |
Content of HID mouse interface descriptor for all speed. More... | |
Interfaces for Mouse Events | |
bool | udi_hid_mouse_moveScroll (int8_t pos) |
Move the scroll wheel. More... | |
bool | udi_hid_mouse_moveY (int8_t pos_y) |
Move the mouse pointer on Y axe. More... | |
bool | udi_hid_mouse_moveX (int8_t pos_x) |
Move the mouse pointer on X axe. More... | |
Interfaces for Buttons Events | |
bool | udi_hid_mouse_btnmiddle (bool b_state) |
Changes middle button state. More... | |
bool | udi_hid_mouse_btnright (bool b_state) |
Changes right button state. More... | |
bool | udi_hid_mouse_btnleft (bool b_state) |
Changes left button state. More... | |
#define | HID_MOUSE_BTN_DOWN true |
Value to signal a button down (pressed). More... | |
#define | HID_MOUSE_BTN_UP false |
Value to signal a button up (released). More... | |
#define HID_MOUSE_BTN_DOWN true |
Value to signal a button down (pressed).
#define HID_MOUSE_BTN_UP false |
Value to signal a button up (released).
#define UDI_HID_MOUSE_DESC |
Content of HID mouse interface descriptor for all speed.
#define UDI_HID_MOUSE_EP_SIZE 8 |
HID mouse endpoints size.
#define UDI_HID_MOUSE_STRING_ID 0 |
By default no string associated to this interface.
bool udi_hid_mouse_btnleft | ( | bool | b_state | ) |
Changes left button state.
[in] | b_state | New button state |
1
if function was successfully done, otherwise 0
. bool udi_hid_mouse_btnmiddle | ( | bool | b_state | ) |
Changes middle button state.
[in] | b_state | New button state |
1
if function was successfully done, otherwise 0
. bool udi_hid_mouse_btnright | ( | bool | b_state | ) |
Changes right button state.
[in] | b_state | New button state |
1
if function was successfully done, otherwise 0
. bool udi_hid_mouse_moveScroll | ( | int8_t | pos | ) |
Move the scroll wheel.
[in] | pos | Signed value to move |
1
if function was successfully done, otherwise 0
. bool udi_hid_mouse_moveX | ( | int8_t | pos_x | ) |
Move the mouse pointer on X axe.
[in] | pos_x | Signed value to move |
1
if function was successfully done, otherwise 0
. bool udi_hid_mouse_moveY | ( | int8_t | pos_y | ) |
Move the mouse pointer on Y axe.
[in] | pos_y | Signed value to move |
1
if function was successfully done, otherwise 0
. UDC_DESC_STORAGE udi_api_t udi_api_hid_mouse |
Global structure which contains standard UDI API for UDC.