This commit is contained in:
2023-12-29 00:57:13 +08:00
commit f11925818e
12 changed files with 495 additions and 0 deletions

22
include/uart.h Normal file
View File

@ -0,0 +1,22 @@
/**************************************************************************************
深圳市普中科技有限公司PRECHIN 普中)
技术支持www.prechin.net
实验名称:串口通信实验
接线说明:
实验现象:下载程序后,当串口助手发送数据给单片机,单片机原封不动转发给串口助手显示
注意事项使用黄色跳线帽将CH340旁的P5端子的UTX和P30短接URX和P31短接出厂默认已短接好
***************************************************************************************/
#ifndef _uart_H
#define _uart_H
#include "public.h"
extern __bit busy;
void uart_init(u8 baud);
void send_string(char *s);
void send_data(u8 dat);
int putchar(char c);
#endif