1.main.c代码如下:
#include "stm32f10x.h" // Device header
#include "Delay.h"
#include "OLED.h"
#include "Serial.h"
int main(void)
{
OLED_Init();
//注:以下各代码分别代表一个自定义函数的实现,只能同时实现一次,否则会有警告
//Serial_Init(0x41);
//Serial_SendByte('A');//发送0x41给电脑等其他串口通信接收端
//uint16_t MyArray[]={0x41,0x42,0x43,0x44};
//Serial_SendArray(MyArray,4);//将MyArray的值传递给Serial_SendArray
//Serial_SendString("Hello Word");//自定义传递字符串
Serial_SendNumber(12345,5);//自定义发送一个数字,在电脑上显示字符串形式的数字
while(1)
{
}
}
最后
以上就是真实老虎最近收集整理的关于STM32:串口发送的全部内容,更多相关STM32内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复