/*********************** 普中科技
www.prechin.com*******************************
*
* 串口通信实验(查询方式 串口 1)
*
*
* 实验目的: 熟悉了解串口的配置
*
* 接线方式: 参考“接线演示”图片
*
* 实验现象: 用串口调试助手收单片机发出的字符数据
* (串口调试助手设置 波特率 115200 数据位 8 停止位 1 奇偶位
NONE )
*
*******************************************************************************
/
#include "stm32f10x_lib.h"
/*************************** 宏定义*********************************************
**/
#define USARTx USART1
#define GPIOx GPIOA
#define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOA
#define GPIO_RxPin GPIO_Pin_10
#define GPIO_TxPin GPIO_Pin_9
/******************************** 变量定义 ------------------------------------*/
USART_InitTypeDef USART_InitStructure;
ErrorStatus HSEStartUpStatus;
/*********************************声明函数 ------------------------------------*/
void RCC_Configuration(void);
评论4
最新资源