Note

This is the documentation for the latest development branch and may refer to features that are not available in released versions. If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

USB HID Keyboard Example

USB HID Keyboard Example#

Overview#

This sample demonstrates three ways to read events from a HID keyboard device.

Source file:

src/rtsmart/examples/peripheral/usb_hid_kbd/test_hid.c

Sample Behavior#

  • default device node: /dev/hidk0

  • blocking read

  • non-blocking read and EAGAIN handling

  • poll()-based notification

  • prints common key names and press/release state

Runtime Parameters#

./test_hid [dev_path]

Build and Run#

cd src/rtsmart/examples/peripheral/usb_hid_kbd
make
./test_hid [dev_path]

If dev_path is omitted, the sample uses /dev/hidk0.

Comments list
Comments
Log in