adding cmd_can

This commit is contained in:
Данила Горнушко 2023-11-24 08:43:28 +03:00
parent 36af7aa6fd
commit 89cdbfd39c
5 changed files with 20 additions and 0 deletions

View file

@ -5,6 +5,7 @@ set(COMPONENT_SRCS
"console.c" "console.c"
"fs.c" "fs.c"
"xvprintf.c" "xvprintf.c"
"cmd_can.c"
) )
set(COMPONENT_ADD_INCLUDEDIRS set(COMPONENT_ADD_INCLUDEDIRS

7
main/cmd_can.c Normal file
View file

@ -0,0 +1,7 @@
#include "cmd_can.h"
#include "driver/twai.h"
#include "hal/twai_types.h"
void register_can_commands(void) {
}

9
main/cmd_can.h Normal file
View file

@ -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

View file

@ -15,6 +15,7 @@
#include "esp_vfs_usb_serial_jtag.h" #include "esp_vfs_usb_serial_jtag.h"
#include "driver/usb_serial_jtag.h" #include "driver/usb_serial_jtag.h"
#include "cmd_system.h" #include "cmd_system.h"
#include "cmd_can.h"
#include "fs.h" #include "fs.h"
#include "xvprintf.h" #include "xvprintf.h"
@ -154,4 +155,5 @@ void initialize_console(void) {
/* Register commands */ /* Register commands */
esp_console_register_help_command(); esp_console_register_help_command();
register_system(); register_system();
register_can_commands();
} }

View file

@ -6,6 +6,7 @@
#include "console.h" #include "console.h"
#include "xvprintf.h" #include "xvprintf.h"
void app_main(void) { void app_main(void) {
can_init(); can_init();
init_tx_ringbuf(); init_tx_ringbuf();