标准库函数解释
void USART_DeInit(USART_TypeDef* USARTx);//将USART寄存器重置为默认值 ,即恢复出厂设置
void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct);//将USART_InitStruct里的参数写入寄存器
void USART_StructInit(USART_InitTypeDef* USART_InitStruct);//给USART_InitStruct填充默认值
void USART_ClockInit(USART_TypeDef* USARTx, USART_ClockInitTypeDef* USART_ClockInitStruct);//同步通讯时需要用到
void USART_ClockStructInit(USART_ClockInitTypeDef* USART_ClockInitStruct);//给USART_ClockInitStruct填充默认值
void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState);//使能USART
void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState);//中断使能
void USART_DMACmd(USART_TypeDef* USARTx, uint16_t USART_DMAReq, FunctionalState NewState);//DMA使能
void USART_SetAddress(USART_TypeDef* USARTx, uint8_t USART_Address);//USART节点地址设置
void USART_WakeUpConfig(USART_TypeDef* USARTx, uint16_t USART_WakeUp);//USART唤醒方式
void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewState);//静默模式使能
void USART_LINBreakDetectLengthConfig(USART_TypeDef* USARTx, uint16_t USART_LINBreakDetectLength);
void USART_LINCmd(USART_TypeDef* USARTx, FunctionalState NewState);
void USART_SendData(USART_TypeDef* USARTx, uint16_t Data);//发送数据
uint16_t USART_ReceiveData(USART_TypeDef* USARTx);//接收数据
void USART_SendBreak(USART_TypeDef* USARTx);//发送断开字符
void USART_SetGuardTime(USART_TypeDef* USARTx, uint8_t USART_GuardTime);
void USART_SetPrescaler(USART_TypeDef* USARTx, uint8_t USART_Prescaler);
void USART_SmartCardCmd(USART_TypeDef* USARTx, FunctionalState NewState);
void USART_SmartCardNACKCmd(USART_TypeDef* USARTx, FunctionalState NewState);
void USART_HalfDuplexCmd(USART_TypeDef* USARTx, FunctionalState NewState);
void USART_OverSampling8Cmd(USART_TypeDef* USARTx, FunctionalState NewState);
void USART_OneBitMethodCmd(USART_TypeDef* USARTx, FunctionalState NewState);
void USART_IrDAConfig(USART_TypeDef* USARTx, uint16_t USART_IrDAMode);
void USART_IrDACmd(USART_TypeDef* USARTx, FunctionalState NewState);
FlagStatus USART_GetFlagStatus(USART_TypeDef* USARTx, uint16_t USART_FLAG);//获取状态
void USART_ClearFlag(USART_TypeDef* USARTx, uint16_t USART_FLAG);//清除状态
ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT);//检查指定的USART中断是否发生。
void USART_ClearITPendingBit(USART_TypeDef* USARTx, uint16_t USART_IT);
|