Update ESP-IDF examples
This commit is contained in:
@@ -7,23 +7,16 @@
|
||||
; Please visit documentation for the other options and examples
|
||||
; http://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:nano32]
|
||||
[env]
|
||||
platform = espressif32
|
||||
framework = espidf
|
||||
board = nano32
|
||||
build_flags = -DCONFIG_WIFI_SSID=\"ESP_AP\" -DCONFIG_WIFI_PASSWORD=\"MYPASS\"
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:espea32]
|
||||
platform = espressif32
|
||||
framework = espidf
|
||||
board = espea32
|
||||
build_flags = -DCONFIG_WIFI_SSID=\"ESP_AP\" -DCONFIG_WIFI_PASSWORD=\"MYPASS\"
|
||||
monitor_speed = 115200
|
||||
[env:pocket_32]
|
||||
board = pocket_32
|
||||
|
||||
[env:esp32dev]
|
||||
platform = espressif32
|
||||
framework = espidf
|
||||
board = esp32dev
|
||||
build_flags = -DCONFIG_WIFI_SSID=\"ESP_AP\" -DCONFIG_WIFI_PASSWORD=\"MYPASS\"
|
||||
monitor_speed = 115200
|
||||
[env:odroid_esp32]
|
||||
board = odroid_esp32
|
||||
|
||||
[env:featheresp32]
|
||||
board = featheresp32
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#define BUF_SIZE (1024)
|
||||
|
||||
static void echo_task()
|
||||
static void echo_task(void *arg)
|
||||
{
|
||||
/* Configure parameters of an UART driver,
|
||||
* communication pins and install the driver */
|
||||
@@ -40,11 +40,12 @@ static void echo_task()
|
||||
.data_bits = UART_DATA_8_BITS,
|
||||
.parity = UART_PARITY_DISABLE,
|
||||
.stop_bits = UART_STOP_BITS_1,
|
||||
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE
|
||||
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
||||
.source_clk = UART_SCLK_APB,
|
||||
};
|
||||
uart_driver_install(UART_NUM_1, BUF_SIZE * 2, 0, 0, NULL, 0);
|
||||
uart_param_config(UART_NUM_1, &uart_config);
|
||||
uart_set_pin(UART_NUM_1, ECHO_TEST_TXD, ECHO_TEST_RXD, ECHO_TEST_RTS, ECHO_TEST_CTS);
|
||||
uart_driver_install(UART_NUM_1, BUF_SIZE * 2, 0, 0, NULL, 0);
|
||||
|
||||
// Configure a temporary buffer for the incoming data
|
||||
uint8_t *data = (uint8_t *) malloc(BUF_SIZE);
|
||||
@@ -57,7 +58,7 @@ static void echo_task()
|
||||
}
|
||||
}
|
||||
|
||||
void app_main()
|
||||
void app_main(void)
|
||||
{
|
||||
xTaskCreate(echo_task, "uart_echo_task", 1024, NULL, 10, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user