USB Host Interface (UHI) for Human Interface Device Mouse (HID Mouse) provides an interface for the configuration and management of USB HID mouse host.
The outline of this documentation is as follows:
For more details for Atmel® Software Framework (ASF) USB Host Stack, refer to following application note:
API Overview
|
Define and functions required by UHC.
|
#define | UHI_HID_MOUSE |
| Global define which contains standard UHI API for UHC. More...
|
|
Value:{ \
}
#define NULL
Definition: def.h:47
void uhi_hid_mouse_uninstall(uhc_device_t *dev)
Uninstall the interface (if installed).
Definition: uhi_hid_mouse.c:175
uhc_enum_status_t uhi_hid_mouse_install(uhc_device_t *dev)
Install interface Allocate interface endpoints if supported.
Definition: uhi_hid_mouse.c:104
void uhi_hid_mouse_enable(uhc_device_t *dev)
Enable the interface.
Definition: uhi_hid_mouse.c:163
Global define which contains standard UHI API for UHC.
It must be added in USB_HOST_UHI define from conf_usb_host.h file.
#define UHI_HID_MOUSE_CHANGE |
( |
|
dev, |
|
|
|
b_plug |
|
) |
| |
#define UHI_HID_MOUSE_EVENT_BTN_LEFT |
( |
|
b_state | ) |
|
#define UHI_HID_MOUSE_EVENT_BTN_MIDDLE |
( |
|
b_state | ) |
|
#define UHI_HID_MOUSE_EVENT_BTN_RIGHT |
( |
|
b_state | ) |
|
#define UHI_HID_MOUSE_EVENT_MOUVE |
( |
|
x, |
|
|
|
y, |
|
|
|
scroll |
|
) |
| |
Install interface Allocate interface endpoints if supported.
- Parameters
-
- Returns
- Status of the install.
References uhc_device_t::address, Assert, usb_iface_desc_t::bDescriptorType, usb_iface_desc_t::bInterfaceClass, usb_iface_desc_t::bInterfaceProtocol, usb_iface_desc_t::bLength, uhc_device_t::conf_desc, uhi_hid_mouse_dev_t::dev, dev, uhi_hid_mouse_dev_t::ep_in, HID_CLASS, HID_PROTOCOL_MOUSE, le16_to_cpu, NULL, uhi_hid_mouse_dev_t::report, uhi_hid_mouse_dev_t::report_size, uhc_device_t::speed, UHC_ENUM_HARDWARE_LIMIT, UHC_ENUM_MEMORY_LIMIT, UHC_ENUM_SOFTWARE_LIMIT, UHC_ENUM_SUCCESS, UHC_ENUM_UNSUPPORTED, uhd_ep_alloc(), USB_DT_ENDPOINT, USB_DT_INTERFACE, USB_EP_DIR_IN, and usb_conf_desc_t::wTotalLength.