mirror of
https://xff.cz/git/pinephone-keyboard/
synced 2024-11-09 22:15:42 +01:00
firmware: Implement scanning block
This allows to disable the keyboard. The firmware will never scan for keys pressed in this mode, and it will powerdown the MCU most of the time.
This commit is contained in:
parent
41418cdc14
commit
2fbc2e057e
1 changed files with 7 additions and 0 deletions
|
@ -1903,6 +1903,13 @@ void main(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
// do nothing if scanning is blocked
|
||||
if (cfg & REG_SYS_CONFIG_SCAN_BLOCK) {
|
||||
if (scan_active)
|
||||
keyscan_idle();
|
||||
continue;
|
||||
}
|
||||
|
||||
// if active scanning is not active and port 6 change was
|
||||
// detected, and some key is still pressed, enter active
|
||||
// scanning mode
|
||||
|
|
Loading…
Reference in a new issue