Skip to content

File syn_usb_hid_keyboard.c

FileList > drivers > syn_usb_hid_keyboard.c

Go to the source code of this file

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

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

Public Attributes

Type Name
const uint8_t SYN_USB_HID_KEYBOARD_REPORT_DESC

Public Functions

Type Name
SYN_Status syn_usb_hid_keyboard_press (SYN_USB_HID * hid, uint8_t modifier, uint8_t keycode)
Send a single keystroke (press 1 key + optional modifier).
SYN_Status syn_usb_hid_keyboard_release (SYN_USB_HID * hid)
Send a keyboard release report (all keys released).
SYN_Status syn_usb_hid_keyboard_send (SYN_USB_HID * hid, uint8_t modifier, const uint8_t keycodes)
Send a USB HID Keyboard report containing active keycodes.

Public Attributes Documentation

variable SYN_USB_HID_KEYBOARD_REPORT_DESC

const uint8_t SYN_USB_HID_KEYBOARD_REPORT_DESC[63];

Standard USB HID Keyboard Report Descriptor (63 Bytes)


Public Functions Documentation

function syn_usb_hid_keyboard_press

Send a single keystroke (press 1 key + optional modifier).

SYN_Status syn_usb_hid_keyboard_press (
    SYN_USB_HID * hid,
    uint8_t modifier,
    uint8_t keycode
) 

Parameters:

  • hid Pointer to USB HID instance.
  • modifier Modifier bitmask (CTRL, SHIFT, ALT, GUI).
  • keycode HID keycode (e.g. SYN_USB_HID_KEY_A).

Returns:

SYN_OK on success.


function syn_usb_hid_keyboard_release

Send a keyboard release report (all keys released).

SYN_Status syn_usb_hid_keyboard_release (
    SYN_USB_HID * hid
) 

Parameters:

  • hid Pointer to USB HID instance.

Returns:

SYN_OK on success.


function syn_usb_hid_keyboard_send

Send a USB HID Keyboard report containing active keycodes.

SYN_Status syn_usb_hid_keyboard_send (
    SYN_USB_HID * hid,
    uint8_t modifier,
    const uint8_t keycodes
) 

Parameters:

  • hid Pointer to USB HID instance.
  • modifier Modifier bitmask (CTRL, SHIFT, ALT, GUI).
  • keycodes Array of up to 6 pressed keycodes (or NULL for no key).

Returns:

SYN_OK on success.



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