6 Commits

Author SHA1 Message Date
Kevin O'Connor
721a036b9d sched: Call timer_setup() from sched_main()
Create a board specific timer_setup() function and call it at the
start of sched_main().

Move udelay() from board code to sched.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-15 05:51:46 -04:00
Kevin O'Connor
21469fea3e flashcmd: Move flash command handlers to new flashcmd.c file
Move the flashing command processing code from canboot_main.c to a new
flashcmd.c file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-13 06:16:08 -04:00
Kevin O'Connor
b0291b3cdb led: Convert code to use a task
There is no need for a custom check_blink_time() function as this can
be done from a new led_blink_task().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-13 06:16:08 -04:00
Kevin O'Connor
db6a9b4d96 sched: Add sched.c and sched.h files to make importing Klipper code easier
Add the sched.c code and associated DECL_INIT(), DECL_TASK() macros so
that it is easier to import low-level Klipper code into the CanBoot
repo.

These additional code wrappers do not increase the overall binary size
as gcc does a good job of inlining the wrappers and removing unused
code during the compile process.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-13 06:16:08 -04:00
Eric Callahan
849b81dce5 led: introduce a short delay before reading initial time
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-05-09 17:12:24 -04:00
Kevin O'Connor
807c1ef0bd led: Move led code to new led.c file
Move the led c code from the buildcommands.py to a new led.c file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-05 15:18:07 -04:00