2018-07-17 15:15:58 +02:00
|
|
|
#ifndef _LORAWAN_H
|
|
|
|
#define _LORAWAN_H
|
2018-06-09 22:28:20 +02:00
|
|
|
|
2018-09-20 17:33:52 +02:00
|
|
|
#include "globals.h"
|
|
|
|
#include "rcommand.h"
|
|
|
|
|
2018-07-15 14:28:05 +02:00
|
|
|
// LMIC-Arduino LoRaWAN Stack
|
|
|
|
#include <lmic.h>
|
|
|
|
#include <hal/hal.h>
|
|
|
|
#include "loraconf.h"
|
|
|
|
|
2018-09-20 17:33:52 +02:00
|
|
|
// Needed for 24AA02E64, does not hurt anything if included and not used
|
|
|
|
#ifdef MCP_24AA02E64_I2C_ADDRESS
|
|
|
|
#include <Wire.h>
|
|
|
|
#endif
|
|
|
|
|
2018-10-03 00:25:05 +02:00
|
|
|
extern QueueHandle_t LoraSendQueue;
|
|
|
|
|
2018-06-09 22:28:20 +02:00
|
|
|
void onEvent(ev_t ev);
|
2018-06-12 19:50:58 +02:00
|
|
|
void gen_lora_deveui(uint8_t *pdeveui);
|
|
|
|
void RevBytes(unsigned char *b, size_t c);
|
2018-06-09 22:28:20 +02:00
|
|
|
void get_hard_deveui(uint8_t *pdeveui);
|
2018-07-15 14:28:05 +02:00
|
|
|
void os_getDevKey(u1_t *buf);
|
|
|
|
void os_getArtEui(u1_t *buf);
|
|
|
|
void os_getDevEui(u1_t *buf);
|
2018-08-03 23:50:04 +02:00
|
|
|
void showLoraKeys(void);
|
2018-08-05 12:16:54 +02:00
|
|
|
void switch_lora(uint8_t sf, uint8_t tx);
|
2018-10-03 16:24:45 +02:00
|
|
|
void lora_send(osjob_t *job);
|
2018-11-17 22:49:14 +01:00
|
|
|
void lora_enqueuedata(MessageBuffer_t *message);
|
2018-11-03 20:29:02 +01:00
|
|
|
void lora_queuereset(void);
|
|
|
|
void lora_housekeeping(void);
|
2018-11-14 22:11:23 +01:00
|
|
|
void user_request_network_time_callback(void *pVoidUserUTCTime,
|
|
|
|
int flagSuccess);
|
2018-11-03 20:44:54 +01:00
|
|
|
|
2018-11-03 20:29:02 +01:00
|
|
|
esp_err_t lora_stack_init();
|
2018-06-09 22:28:20 +02:00
|
|
|
|
2018-07-15 14:28:05 +02:00
|
|
|
#endif
|