commit 2ec294bda4a724a7c168d4b336a5d17a8ffda6ad
parent bcff68a0e23cbb7bbdd534db68e233e19c71a760
Author: Lukas F. Hartmann <lukas@mntre.com>
Date: Thu, 25 Jun 2020 17:14:43 +0200
WIP: SSP0: report only once per second
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/reform2-lpc-fw/src/boards/reform2/board_reform2.c b/reform2-lpc-fw/src/boards/reform2/board_reform2.c
@@ -662,14 +662,15 @@ int main(void)
// handle keyboard commands
handle_commands();
- // report to SPI0 master
- report_to_spi();
cur_second = delayGetSecondsActive();
if (last_second != cur_second) {
if (cur_second-last_second<10) {
// prevent rollovers
cycles_in_state += cur_second-last_second;
+
+ // report to SPI0 master
+ report_to_spi();
}
last_second = cur_second;
}