头文件
#ifndef __LED_H__
#define __LED_H__
//uart4初始化
//RCC_MP_APB1ENSETR寄存器地址,用于使能UART4时钟使能
#define RCC_APB1_ENSETR (*(volatile unsigned int *)0x50000A00)
//RCC_MP_AHB4ENSETR寄存器地址,时钟使能
#define RCC_AHB4_ENSETR (*(volatile unsigned int *)0x50000A28)
//GPIOB_MODER地址,设置引脚复用
#define GPIOB_MODER (*(volatile unsigned int *)0x50003000)
//GPIOG_MODER地址,设置引脚复用
#define GPIOG_MODER (*(volatile unsigned int *)0x50008000)
//GPIOB_AFRL寄存器地址,用与设置PB2引脚复用功能为UART4_RX
#define GPIOB_AFRL (*(volatile unsigned int *)0x50003020)
//GPIOG_AFRH寄存器地址,用与设置PG11引脚复用功能为UART4_TX
#define GPIOG_AFRH (*(volatile unsigned int *)0x50008024)
/*UART4章节初始化寄存器地址参数*/
//USART_CR1寄存器地址,用于设置数据位宽、串口采样率、等
#define USART_CR1 (*(volatile unsigned int *)0x40010000)
//USART_CR2:设置串口停止位位数
#define USART_CR2 (*(volatile unsigned int *)0x40010004)
//USART_BRR:设置串口波特率
#define USART_BRR (*(volatile unsigned int *)0x4001000c)
//USART_RDR:设置串口接收数据寄存器
#define USART_RD