stm32l431_xl_current/Drivers/e22/e22.h

53 lines
997 B
C
Raw Normal View History

2024-07-23 02:00:15 +00:00
#ifndef __E22_H__
#define __E22_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "main.h"
#define NORMAL 111
#define WOR 222
#define CONFIG 333
#define SLEEP 444
#pragma pack(push,1)
typedef struct _e22_config_pack{
unsigned char func;
unsigned char func;
unsigned char func;
unsigned char addr_h;
unsigned char addr_l;
unsigned char net_addr;
unsigned char baudRate;
unsigned char packetFragments;
unsigned char channel;
unsigned char transmissionMode;
}e22_config_pack;
#pragma pack(pop)
typedef int e22_mode;
extern UART_HandleTypeDef huart3;
extern void Serial_SendArray_3(uint8_t *Array, uint16_t Length);
void e22_config(void);
void lora_set_mode(e22_mode mode);
void e22_config_get(void);
void set_addr(uint8_t buf);
void set_net_id(uint8_t buf);
extern uint16_t MB_register[40];
extern uint8_t Transfer_Data_3[DATA_LEN_MAX]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
extern uint8_t Receive_Data_3[DATA_LEN_MAX]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#ifdef __cplusplus
}
#endif
#endif /* __E22_H__ */