11.22:完善注释;提高代码的移植性;完善串口程序。
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
#ifndef __LORA_H__
|
||||
#define __LORA_H__
|
||||
|
||||
#include "USART3.h"
|
||||
|
||||
// #define LORA_MODE
|
||||
|
||||
/* LoRa<52>ľ<EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD> */
|
||||
#define LORA_MODE_INIT 1
|
||||
#define LORA_IS_GATEWAY_NODE 0
|
||||
#define LORA_GPIO_PIN_TX GPIO_Pin_10
|
||||
#define LORA_GPIO_PIN_RX GPIO_Pin_11
|
||||
#define LORA_GPIO_PIN_ATK_AUX GPIO_Pin_4 //PA4
|
||||
@@ -34,6 +31,8 @@
|
||||
#define LORA_EXECUTOR_COMMAND_ON 0x01
|
||||
#define LORA_EXECUTOR_COMMAND_OFF 0x00
|
||||
|
||||
#include "USART3.h"
|
||||
|
||||
/* LoRa<52><61>ֲ<EFBFBD><D6B2> */
|
||||
|
||||
typedef enum {
|
||||
@@ -141,10 +140,14 @@ static LoRaExecutorCmd_t xLoRaExecutorCommand = {
|
||||
};
|
||||
|
||||
void vLoRaConnectionPkt(uint8_t ucNodeId);
|
||||
void vLoRaToGateIdPkt(uint8_t ucNodeId);
|
||||
void vLoRaToGateSenIdPkt(uint8_t ucSensorId);
|
||||
void vLoRaToGateExeIdPkt(uint8_t ucExecutorId);
|
||||
eLoRaMsgRecStatus xLoRaMessageReceived(uint8_t *pucData);
|
||||
eLoRaMsgRecStatus xLoRaMsgProcess(uint8_t ucDataRecNodeId, uint8_t ucDataRecExeId, uint8_t ucDataRecExeSta);
|
||||
|
||||
#if(LORA_IS_GATEWAY_NODE == 1)
|
||||
#elif(LORA_IS_GATEWAY_NODE == 0)
|
||||
void vLoRaToGateIdPkt(uint8_t ucNodeId);
|
||||
void vLoRaToGateSenIdPkt(uint8_t ucSensorId);
|
||||
void vLoRaToGateExeIdPkt(uint8_t ucExecutorId);
|
||||
eLoRaMsgRecStatus xLoRaMessageReceived(uint8_t *pucData);
|
||||
eLoRaMsgRecStatus xLoRaMsgProcess(uint8_t ucDataRecNodeId, uint8_t ucDataRecExeId, uint8_t ucDataRecExeStatus);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user