46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
|
/*
|
||
|
* user.h
|
||
|
*
|
||
|
* Created on: Nov 11, 2024
|
||
|
* Author: 10425
|
||
|
*/
|
||
|
|
||
|
#ifndef INC_USER_H_
|
||
|
#define INC_USER_H_
|
||
|
|
||
|
#include "main.h"
|
||
|
#include "dma.h"
|
||
|
#include "spi.h"
|
||
|
#include "usart.h"
|
||
|
#include "gpio.h"
|
||
|
|
||
|
#include "user_stick.h"
|
||
|
#include "string.h"
|
||
|
#include "math.h"
|
||
|
#include "stdlib.h"
|
||
|
|
||
|
#include "RN8209D.h"
|
||
|
|
||
|
#define ENABLE_INT() __set_PRIMASK(0) /* 使能全局中断 */
|
||
|
#define DISABLE_INT() __set_PRIMASK(1) /* 禁止全局中断 */
|
||
|
|
||
|
|
||
|
#define BUFF_LEN 256
|
||
|
|
||
|
//串口2为485接口
|
||
|
extern volatile uint8_t usart2_count; //串口接收数据个数
|
||
|
extern uint8_t Rx2_Buff[BUFF_LEN]; //串口接收缓冲区
|
||
|
extern uint8_t Tx2_Buff[BUFF_LEN] ; //串口发送缓冲区
|
||
|
extern uint8_t u2_Buff[BUFF_LEN]; //用户缓冲区
|
||
|
|
||
|
//串口3为lora通讯口
|
||
|
extern volatile uint8_t usart3_count; //串口接收数据个数
|
||
|
extern uint8_t Rx3_Buff[BUFF_LEN]; //串口接收缓冲区
|
||
|
extern uint8_t Tx3_Buff[BUFF_LEN]; //串口发送缓冲区
|
||
|
extern uint8_t u3_Buff[BUFF_LEN] ; //用户缓冲区
|
||
|
|
||
|
|
||
|
void user_main();
|
||
|
void user_init();
|
||
|
#endif /* INC_USER_H_ */
|