pub trait KiibohdCommandInterface<const H: usize> {
Show 14 methods // Required methods fn h0001_device_name(&self) -> Option<&str>; fn h0001_firmware_name(&self) -> Option<&str>; // Provided methods fn hidio_sync_packet(&self) { ... } fn h0001_device_serial_number(&self) -> Option<&str> { ... } fn h0001_device_version(&self) -> Option<&str> { ... } fn h0001_device_mcu(&self) -> Option<&str> { ... } fn h0001_firmware_version(&self) -> Option<&str> { ... } fn h0001_device_vendor(&self) -> Option<&str> { ... } fn h0016_flashmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... } fn h001a_sleepmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... } fn h0021_pixelsetting_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... } fn h0026_directset_cmd(&mut self, _data: Cmd<{ _ }>) -> Result<Ack, Nak> { ... } fn h0031_terminalinput(&mut self, _data: Cmd<H>) -> bool { ... } fn h0050_manufacturing_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... }
}
Expand description

Kiibohd Command Interface Simplified CommandInterface used to receive HID-IO callbacks.

Required Methods§

source

fn h0001_device_name(&self) -> Option<&str>

Returns the device name (e.g. Keystone TKL)a Callback

source

fn h0001_firmware_name(&self) -> Option<&str>

Returns name of firmware (e.g. kiibohd) Callback

Provided Methods§

source

fn hidio_sync_packet(&self)

HID-IO Sync Packet received TODO: Is this necessary anymore, or can timeouts be handled here? Callback

source

fn h0001_device_serial_number(&self) -> Option<&str>

Returns the device serial number Callback

source

fn h0001_device_version(&self) -> Option<&str>

Returns the device version Callback

source

fn h0001_device_mcu(&self) -> Option<&str>

Returns device MCU name Callback

source

fn h0001_firmware_version(&self) -> Option<&str>

Returns version of firmware Callback

source

fn h0001_device_vendor(&self) -> Option<&str>

Returns device vendor name (e.g. Input Club) Callback

source

fn h0016_flashmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>

Schedule flash mode (jump to bootloader) Ideally, this function should return a response, push USB buffer, then initiate flash mode (so that the HID-IO host gets confirmation that we’re going to enter flash mode) However, if that is not possible, it is ok to immediately enter flash mode. Callback

source

fn h001a_sleepmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>

Schedule sleep mode Ideally, this function should return a response, push USB buffer, then initiate sleep mode (so that the HID-IO host gets confirmation that we’re going to enter sleep mode) However, if that is not possible, it is ok to immediately enter sleep mode. It is possible the device is not ready for sleep, send the appropriate error flag in this case. Callback

source

fn h0021_pixelsetting_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>

General Pixel/LED settings for HID-IO

source

fn h0026_directset_cmd(&mut self, _data: Cmd<{ _ }>) -> Result<Ack, Nak>

Raw pixel/LED data setting This is device/configuration specific, but is also the most efficient way to set pixels/LEDs.

source

fn h0031_terminalinput(&mut self, _data: Cmd<H>) -> bool

Logging callback Input received from host Return false if not able to log (buffer full, or disabled) Callback

source

fn h0050_manufacturing_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>

Manufacturing command Input manufacturing command coming from the host Callback

Implementors§