stm32l431_xl_current/Drivers/e22/e22.h

52 lines
826 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"
2024-07-24 02:31:30 +00:00
#define E22_DELAY_MS 15
2024-07-23 02:00:15 +00:00
#define NORMAL 111
#define WOR 222
#define CONFIG 333
#define SLEEP 444
#pragma pack(push,1)
2024-07-24 02:31:30 +00:00
// <20><><EFBFBD>ð<EFBFBD>
2024-07-23 02:00:15 +00:00
typedef struct _e22_config_pack{
unsigned char func;
2024-07-23 07:38:51 +00:00
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;
2024-07-23 02:00:15 +00:00
}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);
2024-07-23 07:38:51 +00:00
void e22_init();
2024-07-23 02:00:15 +00:00
void lora_set_mode(e22_mode mode);
#ifdef __cplusplus
}
#endif
#endif /* __E22_H__ */