I am starting to learn about the use of ESP8266 with the RTOS SDK, I am using ESP-01.
Below is my very first attempt of programming the ESP, based on the hello_world example. I want to write an array of bytes on uart.
void app_main()
{
uart_set_baudrate(0, 115200);
vTaskDelay(2000 / portTICK_PERIOD_MS);
//main loop
while (1)
{
const char buff[8] = { 0,1,2,3,4,5,6,7 };
uart_write_bytes(0, &buff[0], 8);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}
I am monitoring the serial port, and the ESP is sending something like uart: uart_write bytes(775): uart driver error. Check the picture.
What is wrong? Or maybe, what is missing? What are the steps from now on to reach what I want? That is, be able to write an array to the uart? Will I need to deal with transmit ISR?
OBS: I really want to write bytes, and not use the printf()...
Regards.
EDIT:
Is this missing on setup?
uart_driver_install(0, 2048, 2048, int queue_size, QueueHandle_t *uart_queue, int no_use)
If yes, what is queue_size and how to implement QueueHandle_t *uart_queue?
EDIT2
After I put that call on the setup:
uart_driver_install(0, 2048, 2048, 0, NULL, 0);
The send via UART worked, it is sending 00 01 02 03 04 05 06 07...
But don't know what I am doing by using queue_size = 0 and uart_queue = NULL. Could somebody explain what these things do?
Regards.