Skip to content

File syn_usb_hid_mouse.c

FileList > drivers > syn_usb_hid_mouse.c

Go to the source code of this file

Zero-Heap USB HID Boot Mouse Device Helper Module Implementation.

  • #include "syntropic/drivers/syn_usb_hid_mouse.h"
  • #include <string.h>

Public Attributes

Type Name
const uint8_t SYN_USB_HID_MOUSE_REPORT_DESC = /* multi line expression */

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.

Public Attributes Documentation

variable SYN_USB_HID_MOUSE_REPORT_DESC

const uint8_t SYN_USB_HID_MOUSE_REPORT_DESC[54];

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).

SYN_Status syn_usb_hid_mouse_click (
    SYN_USB_HID * hid,
    uint8_t buttons
) 

Parameters:

  • hid Pointer to USB HID instance.
  • buttons Button 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.

SYN_Status syn_usb_hid_mouse_move (
    SYN_USB_HID * hid,
    int8_t x,
    int8_t y
) 

Parameters:

  • hid Pointer to USB HID instance.
  • x Relative X axis displacement.
  • y Relative 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:

  • hid Pointer to USB HID instance.
  • buttons Button bitmask (Left=0x01, Right=0x02, Middle=0x04).
  • x Relative X axis displacement.
  • y Relative Y axis displacement.
  • wheel Relative vertical scroll wheel displacement.

Returns:

SYN_OK on success.



The documentation for this class was generated from the following file src/syntropic/drivers/syn_usb_hid_mouse.c