GeekIMU/2.Firmware/STM32/Firmware/system/usart/usart.h

32 lines
1.1 KiB
C
Raw Normal View History

2024-11-09 21:39:20 +08:00
/******************** (C) COPYRIGHT 2020 GEEKIMU *******************************
* File Name : usart.h
* Current Version : V2.0 & ST 3.5.0
* Author : zhanli 719901725@qq.com & JustFeng.
* Date of Issued : 2019.5.26 zhanli : Create
* Comments : STM32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
********************************************************************************/
#ifndef _USART_H_
#define _USART_H_
#include "stdio.h"
#include "sys.h"
#define USART_REC_LEN 200 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> 200
#define EN_USART1_RX 1 //ʹ<>ܣ<EFBFBD>1<EFBFBD><31>/<2F><>ֹ<EFBFBD><D6B9>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>
extern u8 USART_RX_BUF[USART_REC_LEN]; //<2F><><EFBFBD>ջ<EFBFBD><D5BB><EFBFBD>,<2C><><EFBFBD><EFBFBD>USART_REC_LEN<45><4E><EFBFBD>ֽ<EFBFBD><>ֽ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>з<EFBFBD>
extern u16 USART_RX_STA; //<2F><><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>
/**----------------------------------------------------------------------
* Function : uart_init
* Description : STM32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Input : bound : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
void uart_init(u32 bound);
#endif