使用原生SDK输出 串口hello
SDK版本:esp8266_nonos_sdk-2.2.0
ESP8266 使用笔记(五) 串口输出helloWord
ESP8266 使用笔记(五) 串口输出helloWord
注意串口助手的波特率(不配置波特率的话系统上电默认765000)
ESP8266 使用笔记(五) 串口输出helloWord

另一种输出方法

uart_init(115200,115200)
uart0_sendStr(”\r\nhello world\r\n”);
/********************************************************************
* FunctionName : uart0_sendStr
* Description : use uart0 to transfer buffer
* Parameters : uint8 *buf - point to send buffer
* uint16 len - buffer len
* Returns :
*********************************************************************/
void ICACHE_FLASH_ATTR
uart0_sendStr(const char *str)
{
while(*str){
uart_tx_one_char(UART0, *str++);
}
}

ESP8266 使用笔记(五) 串口输出helloWord

乱码不可避免,初始波特率都在74800左右
ESP8266 使用笔记(五) 串口输出helloWord

相关文章:

  • 2021-09-09
  • 2021-11-17
  • 2021-11-17
  • 2021-08-22
  • 2021-09-13
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2021-07-09
  • 2022-02-12
  • 2021-11-07
  • 2021-07-12
  • 2021-11-17
  • 2022-12-23
  • 2021-11-25
相关资源
相似解决方案