49 lines
783 B
C
49 lines
783 B
C
#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 start_add;
|
|
unsigned char data_len;
|
|
unsigned char ADDH;
|
|
unsigned char ADDL;
|
|
unsigned char NETID;
|
|
unsigned char REG0;
|
|
unsigned char REG1;
|
|
unsigned char REG2;
|
|
unsigned char REG3;
|
|
unsigned char CRYPT_H;
|
|
unsigned char CRYPT_L;
|
|
}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_init();
|
|
void lora_set_mode(e22_mode mode);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __E22_H__ */
|
|
|