added callback for incoming lorawan data
This commit is contained in:
parent
e181984c8e
commit
84a3da060d
|
|
@ -122,5 +122,7 @@ uint32_t GetUpTime(void);
|
|||
|
||||
void RegEthReset(void (*eth_rst)(uint8_t level));
|
||||
void RegGSMReset(void (*gsm_rst)(uint8_t level));
|
||||
void regLoRaUserReceiveHandler(
|
||||
void (*user_handler)(const char *message, int length, int port));
|
||||
|
||||
#endif /* MAIN_INCLUDE_NETTRANSPORT_H_ */
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@ static StaticQueue_t xStaticLoRaMessagesQueue;
|
|||
uint8_t LoRaMessagesQueueStorageArea[LORAWAN_MESSAGE_BUFER_LENTH
|
||||
* sizeof(DATA_SEND_STRUCT)];
|
||||
|
||||
void (*LoRaUserReceiveHandler)(const char *message, int length, int port);
|
||||
void regLoRaUserReceiveHandler(
|
||||
void (*user_handler)(const char *message, int length, int port))
|
||||
{
|
||||
LoRaUserReceiveHandler = user_handler;
|
||||
}
|
||||
|
||||
|
||||
esp_err_t LORASendData(DATA_SEND_STRUCT *pdss)
|
||||
{
|
||||
char *ptr = (char*) malloc(MESSAGE_LENGTH);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user