1. 参考手册上写的是2个寄存器,
2. 但是源码里面定义的结构体里面,DR只是一个uint16_t,如果是0-8位表示数据值,那2个寄存器应该暂用18个位,一个uint16_t根本装不下,它怎么实现全双工呢?
[C] 纯文本查看 复制代码typedef struct
{
__IO uint16_t SR;
uint16_t RESERVED0;
__IO uint16_t DR;
uint16_t RESERVED1;
__IO uint16_t BRR;
uint16_t RESERVED2;
__IO uint16_t CR1;
uint16_t RESERVED3;
__IO uint16_t CR2;
uint16_t RESERVED4;
__IO uint16_t CR3;
uint16_t RESERVED5;
__IO uint16_t GTPR;
uint16_t RESERVED6;
} USART_TypeDef; |