kiibohd-usb

Crates.iokiibohd-usb
lib.rskiibohd-usb
version0.1.6
sourcesrc
created_at2022-04-30 04:49:06.952393
updated_at2023-05-19 05:46:10.646604
descriptionKiibohd USB HID Interface
homepage
repositoryhttps://github.com/kiibohd/kiibohd-core
max_upload_size
id578000
size58,636
Jacob Alexander (haata)

documentation

README

kiibohd-usb

Rust docs.rs Crates.io Crates.io Crates.io

Combination USB HID interface from the kiibohd project. Instanciates the following USB HID interfaces:

  • Boot mode keyboard (supports auto-switching through SET_PROTOCOL and manual switching)
  • NKRO mode keyboard
  • Consumer Ctrl and System Ctrl
  • Mouse
  • HID-IO

Usage

let (mut kbd_producer, mut kbd_consumer) = KBD_QUEUE.split();
let (mut mouse_producer, mut mouse_consumer) = MOUSE_QUEUE.split();
let (mut ctrl_producer, mut ctrl_consumer) = CTRL_QUEUE.split();
let (mut hidio_rx_producer, mut hidio_rx_consumer) = HIDIO_RX_QUEUE.split();
let (mut hidio_tx_producer, mut hidio_tx_consumer) = HIDIO_TX_QUEUE.split();
let usb_hid = HidInterface::new(
		usb_bus, /* UsbBusAllocator */
		HidCountryCode::NotSupported,
		kbd_consumer,
		mouse_consumer,
		ctrl_consumer,
		hidio_rx_producer,
		hidio_tx_consumer,
);

usb_hid.poll(); // Poll HID-IO
usb_hid.push(); // Push hid reports and poll HID-IO

See docs.rs for more details.

WIP

  • Mouse interface not enabled yet (still some issues during allocation on atsam4s)

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 192

cargo fmt