SDCC 4.3.3 complains about the declaration not matching the prototype:
error 283: function declarator with no prototype
Add `void` to the AVR functions as well, even though no warning is
issued by GCC.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Use the default mode for reading the keyboard scan matrix when being
used as a keyboard. There should be no perceived change in behavior, but
should make the code easier to understand.
Note: `KSO[17:16]` are configured by `GPCRC` on boards that use them.
They are now set to alternate function to use in KBS mode rather than
GPIO mode, with the pull-up enabled to prevent them from floating when
configured as open-drain.
As part of this change, we now only read the hardware matrix state once
upfront, instead of on every iteration through the loop applying the
logic.
Tested by verifying that typing still works on darp9.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Enable PWRSW WDT 2 and use the default timeout of 10 seconds.
Allows forcing an EC reset in case it gets into an invalid state.
Signed-off-by: Tim Crawford <tcrawford@system76.com>