stm32/App/usart/usart.h

35 lines
1.1 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __USART_H
#define __USART_H
#include "stdio.h"
#include "sys.h"
//! 串口1,2,2数据接收缓冲buffer
extern u8 USART1_RX_BUF[7],USART2_RX_BUF[10],USART3_RX_BUF[75];
//! 串口1,2,3数据接收状态
extern u16 USART1_RX_STA,USART2_RX_STA,USART3_RX_STA;
//********************************************************************//
//! 函数名:uart1_init
//! 功能:串口1初始化接收噪音传感器数据
//! 输入:bound:串口波特率
//! 输出:none
//********************************************************************//
void uart1_init(u32 bound);
//********************************************************************//
//! 函数名:uart2_init
//! 功能:串口2初始化接收pm2.5传感器数据
//! 输入:bound波特率
//! 输出:none
//********************************************************************//
void uart2_init(u32 bound);
//********************************************************************//
//! 函数名:uart3_init
//! 功能:串口3初始化;
//! 输入:none
//! 输出:none
//********************************************************************//
void uart3_init(u32 bound);
#endif