File syn_usb_hid_mouse.h¶
FileList > drivers > syn_usb_hid_mouse.h
Go to the source code of this file
Zero-Heap USB HID Boot Mouse Device Helper Module.
#include "syntropic/common/syn_defs.h"#include "syntropic/drivers/syn_usb_hid.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_USB_HID_MouseReport |
Public Attributes¶
| Type | Name |
|---|---|
| const uint8_t | SYN_USB_HID_MOUSE_REPORT_DESC |
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_usb_hid_mouse_click (SYN_USB_HID * hid, uint8_t buttons) Send a USB HID Mouse click (press button + release). |
| SYN_Status | syn_usb_hid_mouse_move (SYN_USB_HID * hid, int8_t x, int8_t y) Move the USB HID Mouse pointer relatively. |
| SYN_Status | syn_usb_hid_mouse_send (SYN_USB_HID * hid, uint8_t buttons, int8_t x, int8_t y, int8_t wheel) Send a USB HID Mouse report with relative movement and buttons. |
Macros¶
| Type | Name |
|---|---|
| define | SYN_USB_HID_MOUSE_BTN_LEFT (1U << 0)Left mouse button bitmask. |
| define | SYN_USB_HID_MOUSE_BTN_MIDDLE (1U << 2)Middle mouse button bitmask. |
| define | SYN_USB_HID_MOUSE_BTN_RIGHT (1U << 1)Right mouse button bitmask. |
Public Attributes Documentation¶
variable SYN_USB_HID_MOUSE_REPORT_DESC¶
Standard USB HID Mouse Report Descriptor (54 Bytes)
Public Functions Documentation¶
function syn_usb_hid_mouse_click¶
Send a USB HID Mouse click (press button + release).
Parameters:
hidPointer to USB HID instance.buttonsButton bitmask (e.g. SYN_USB_HID_MOUSE_BTN_LEFT).
Returns:
SYN_OK on success.
function syn_usb_hid_mouse_move¶
Move the USB HID Mouse pointer relatively.
Parameters:
hidPointer to USB HID instance.xRelative X axis displacement.yRelative Y axis displacement.
Returns:
SYN_OK on success.
function syn_usb_hid_mouse_send¶
Send a USB HID Mouse report with relative movement and buttons.
SYN_Status syn_usb_hid_mouse_send (
SYN_USB_HID * hid,
uint8_t buttons,
int8_t x,
int8_t y,
int8_t wheel
)
Parameters:
hidPointer to USB HID instance.buttonsButton bitmask (Left=0x01, Right=0x02, Middle=0x04).xRelative X axis displacement.yRelative Y axis displacement.wheelRelative vertical scroll wheel displacement.
Returns:
SYN_OK on success.
Macro Definition Documentation¶
define SYN_USB_HID_MOUSE_BTN_LEFT¶
Left mouse button bitmask.
USB HID Mouse Button Bitmasks
define SYN_USB_HID_MOUSE_BTN_MIDDLE¶
Middle mouse button bitmask.
define SYN_USB_HID_MOUSE_BTN_RIGHT¶
Right mouse button bitmask.
The documentation for this class was generated from the following file src/syntropic/drivers/syn_usb_hid_mouse.h