add nvs code.
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
#include "Application.h"
|
||||
#include "CustomCommand.h"
|
||||
#include "LedController.h"
|
||||
#include "cmd_nvs.h"
|
||||
#include "cmd_system.h"
|
||||
#include "cmd_wifi.h"
|
||||
#include "driver/uart.h"
|
||||
#include "esp_console.h"
|
||||
#include "esp_log.h"
|
||||
@ -29,13 +30,16 @@ extern "C" void app_main() {
|
||||
initialize_nvs();
|
||||
initialize_filesystem();
|
||||
initialize_console();
|
||||
Application::instance()->initialize();
|
||||
Application::instance()->setField("author", "amass");
|
||||
esp_console_register_help_command();
|
||||
register_system_common();
|
||||
register_system_sleep();
|
||||
register_wifi();
|
||||
register_custom();
|
||||
register_nvs();
|
||||
|
||||
LedController::instance()->initialize();
|
||||
|
||||
while (true) {
|
||||
char *line = linenoise(prompt);
|
||||
if (line == NULL) { /* Break on EOF or error */
|
||||
@ -73,7 +77,7 @@ static void initialize_console() {
|
||||
esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
|
||||
esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
|
||||
|
||||
uart_config_t uart_config = {0};
|
||||
uart_config_t uart_config = {};
|
||||
uart_config.baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE;
|
||||
uart_config.data_bits = UART_DATA_8_BITS;
|
||||
uart_config.parity = UART_PARITY_DISABLE;
|
||||
@ -84,7 +88,7 @@ static void initialize_console() {
|
||||
|
||||
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
|
||||
|
||||
esp_console_config_t console_config = {0};
|
||||
esp_console_config_t console_config = {};
|
||||
console_config.max_cmdline_args = 8;
|
||||
console_config.max_cmdline_length = 256;
|
||||
console_config.hint_color = atoi(LOG_COLOR_CYAN);
|
||||
|
Reference in New Issue
Block a user