diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 3516e52..af54de9 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -5,6 +5,7 @@ set(COMPONENT_SRCS "console.c" "fs.c" "xvprintf.c" + "cmd_can.c" ) set(COMPONENT_ADD_INCLUDEDIRS diff --git a/main/cmd_can.c b/main/cmd_can.c new file mode 100644 index 0000000..50370b2 --- /dev/null +++ b/main/cmd_can.c @@ -0,0 +1,7 @@ +#include "cmd_can.h" +#include "driver/twai.h" +#include "hal/twai_types.h" + +void register_can_commands(void) { + +} diff --git a/main/cmd_can.h b/main/cmd_can.h new file mode 100644 index 0000000..37be647 --- /dev/null +++ b/main/cmd_can.h @@ -0,0 +1,9 @@ +#ifndef MAIN_CMD_CAN_H +#define MAIN_CMD_CAN_H + + +// functions + +void register_can_commands(void); + +#endif // MAIN_CMD_CAN_H diff --git a/main/console.c b/main/console.c index dd56f98..ed8ce48 100644 --- a/main/console.c +++ b/main/console.c @@ -15,6 +15,7 @@ #include "esp_vfs_usb_serial_jtag.h" #include "driver/usb_serial_jtag.h" #include "cmd_system.h" +#include "cmd_can.h" #include "fs.h" #include "xvprintf.h" @@ -154,4 +155,5 @@ void initialize_console(void) { /* Register commands */ esp_console_register_help_command(); register_system(); + register_can_commands(); } diff --git a/main/main.c b/main/main.c index f7a9841..99f10f9 100644 --- a/main/main.c +++ b/main/main.c @@ -6,6 +6,7 @@ #include "console.h" #include "xvprintf.h" + void app_main(void) { can_init(); init_tx_ringbuf();