4 Commits

Author SHA1 Message Date
Kevin O'Connor
da7cc967d0 gpio: Resync gpio code with upstream Klipper code
Add a shutdown() compatibility macro so that the upstream Klipper gpio
code can be used unmodified.  Sync the rp2040, lpc176x, and stm32
gpio.c code with Klipper's code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-22 12:12:24 -05:00
Kevin O'Connor
799fe5313b command: Rework command encoding and processing to be more similar to Klipper
Introduce the Klipper command_encode() and command_dispatch() style
functions.  This makes it easier to import additional Klipper
low-level message handling code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-13 06:16:08 -04:00
Kevin O'Connor
38ef4860da command: Move command processing to new command.c file
Move the low-level command parsing and encoding code from
canboot_main.c to a new command.c file.

Standardize the parameters and naming for command handlers.  Rename
send_ack() to console_send_ack() and rework parameters to be similar
to command handlers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-13 06:16:08 -04:00
Kevin O'Connor
83ecbcc01d command: Add command.h file to make importing Klipper code easier
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-13 06:16:08 -04:00