使用 ESP8266 UART1(GPIO2)作为程序日志输出串口,可进行如下配置:
menuconfig -> Component Config -> Common ESP-related
可基于 ESP8266_RTOS_SDK/examples/peripherals/uart_events 例程来测试,在 menuconfig 中开启如下设置:
Component config -> Common ESP-related -> Swap UART0 I/O pins
或者在 uart_driver_install() 函数之后调用 uart_enable_swap() 函数