tool: Add a system76_ec command to disable input events
For testing Launch keyboards. Could easily support in EC firmware as well if we had a use for that, but not adding that for now.
This commit is contained in:
@ -35,6 +35,7 @@ enum Cmd {
|
||||
LedSetMode = 16,
|
||||
MatrixGet = 17,
|
||||
LedSave = 18,
|
||||
SetNoInput = 19,
|
||||
}
|
||||
|
||||
const CMD_SPI_FLAG_READ: u8 = 1 << 0;
|
||||
@ -279,6 +280,10 @@ impl<A: Access> Ec<A> {
|
||||
self.command(Cmd::MatrixGet, matrix)
|
||||
}
|
||||
|
||||
pub unsafe fn set_no_input(&mut self, no_input: bool) -> Result<(), Error> {
|
||||
self.command(Cmd::SetNoInput, &mut [no_input as u8])
|
||||
}
|
||||
|
||||
pub fn into_dyn(self) -> Ec<Box<dyn Access>>
|
||||
where A: 'static {
|
||||
Ec {
|
||||
|
Reference in New Issue
Block a user