uart_config_t uart_config = {
.baud_rate = 115200,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.source_clk = UART_SCLK_DEFAULT
};
uart_param_config(UART_NUM_1, &uart_config);
uart_set_pin(UART_NUM_1, GPIO_NUM_7, GPIO_NUM_6, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_driver_install(UART_NUM_1, 16, 0, 0, NULL, 0);
char* send_check = "AT\r\n";
uart_write_bytes(UART_NUM_1, send_check, strlen(send_check));
char recv_check[128];
uart_read_bytes(UART_NUM_1, &recv_check, 128, 100);
ESP_LOGI(TAG, "dataIn:%s", &recv_check);
这是我根据example写出来的代码,但是会报错
[0;31mE (253) uart: uart_driver_install(1562): uart rx buffer length error[0m
[0;31mE (253) uart: uart_write_bytes(1244): uart driver error[0m
[0;31mE (263) uart: uart_read_bytes(1281): uart driver error[0m
[0;32mI (263) scan: dataIn:[0m
根据报错,uart_driver_install的缓存大小已经从16设置到128,都是如此,请问原因在哪