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