pub struct MatrixKeyboardConfig {
pub enabled: bool,
pub width: u8,
pub height: u8,
pub row_pins: [u8; 16],
pub column_pins: [u8; 8],
pub direct_macro_bitmap: [u8; 16],
pub alternate_function_pin: u8,
pub scanning_decimation: u8,
}Expand description
A snapshot of the device-side matrix-keyboard configuration, returned by
crate::PoKeysDevice::get_matrix_keyboard_configuration.
Read-only view of what the firmware currently has stored — reflects the result of the most recent successful configuration write or pre-existing state from non-volatile storage. Useful for diff-against-device flows.
Fields§
§enabled: booltrue if the matrix keyboard is currently enabled (bit 0 of the
configuration byte at spec byte 9).
width: u8Number of columns (1..=8). Decoded from (size_byte >> 4) + 1.
height: u8Number of rows (1..=16). Decoded from (size_byte & 0x0F) + 1.
row_pins: [u8; 16]1-based pin numbers for rows 0..16. Trailing entries beyond height
are 0. Stored 1-based for human readability; the protocol uses
0-based pin codes on the wire.
column_pins: [u8; 8]1-based pin numbers for columns 0..8. Trailing entries beyond width
are 0.
direct_macro_bitmap: [u8; 16]Direct/macro mapping bitmap, 128 bits. Bit k set means key k
uses macro mapping; clear means direct key mapping.
alternate_function_pin: u8Alternate-function pin (1-based, or 0 if disabled). When set, the state of this digital input pin selects between the primary and alternate keyboard mapping for each key.
scanning_decimation: u8Scanning decimation factor (0..=50). Higher values reduce the device-side scan rate.
Implementations§
Trait Implementations§
Source§impl Clone for MatrixKeyboardConfig
impl Clone for MatrixKeyboardConfig
Source§impl Debug for MatrixKeyboardConfig
impl Debug for MatrixKeyboardConfig
Source§impl<'de> Deserialize<'de> for MatrixKeyboardConfig
impl<'de> Deserialize<'de> for MatrixKeyboardConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MatrixKeyboardConfig
Source§impl PartialEq for MatrixKeyboardConfig
impl PartialEq for MatrixKeyboardConfig
Source§impl Serialize for MatrixKeyboardConfig
impl Serialize for MatrixKeyboardConfig
impl StructuralPartialEq for MatrixKeyboardConfig
Auto Trait Implementations§
impl Freeze for MatrixKeyboardConfig
impl RefUnwindSafe for MatrixKeyboardConfig
impl Send for MatrixKeyboardConfig
impl Sync for MatrixKeyboardConfig
impl Unpin for MatrixKeyboardConfig
impl UnsafeUnpin for MatrixKeyboardConfig
impl UnwindSafe for MatrixKeyboardConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.