38 lines
841 B
C
38 lines
841 B
C
#ifndef _usart5_H
|
|
#define _usart5_H
|
|
#include "bsp.h"
|
|
#include "general_type.h"
|
|
#include "stm32l1xx_usart.h"
|
|
#include <math.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
#if defined ( __CC_ARM )
|
|
#pragma anon_unions
|
|
#endif
|
|
|
|
#define Usart5_MAX_RECV_LEN 100 //最大接收缓存字节数
|
|
|
|
void Usart5_Configuration(u32 baund);
|
|
void Usart5_ReceiveBuff_Clear(void);
|
|
void u5_printf(char* fmt,...);
|
|
typedef struct STRUCT_Usart5_Fram //数据帧结构体
|
|
{
|
|
char Usart5_RX_BUF[Usart5_MAX_RECV_LEN];
|
|
union
|
|
{
|
|
__IO u16 InfAll;
|
|
struct
|
|
{
|
|
__IO u16 FramLength :15; // 14:0
|
|
__IO u16 FramFinishFlag :1; // 15
|
|
}InfBit;
|
|
};
|
|
|
|
}Usart5_Fram_Record_Struct;
|
|
|
|
extern Usart5_Fram_Record_Struct Usart5_Fram_Record_Structs;
|
|
|
|
#endif
|
|
|