lorawan.h 640 Bytes
Newer Older
1
2
#ifndef AMPEL_LORAWAN_H_
#define AMPEL_LORAWAN_H_
3
#if defined(ESP32)
4
5
6
7
8
#include <Arduino.h>
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
typedef uint8_t u1_t;
Eric Duminil's avatar
Note    
Eric Duminil committed
9
10

//TODO: Should lmic_project_config.h be defined somewhere?
11
12
13
14
15
16
17
18
//#include <lmic_project_config.h>

#include "co2_sensor.h"
#include "led_effects.h"
#include "config.h"

#include "util.h"

Eric Duminil's avatar
Eric Duminil committed
19
20
21
22
namespace config {
  extern uint16_t lorawan_sending_interval; // [s]
}

23
24
namespace lorawan {
  extern bool waiting_for_confirmation;
Eric Duminil's avatar
Eric Duminil committed
25
26
  extern bool connected;
  extern String last_transmission;
27
28
29
30
31
32
  void initialize();
  void process();
  void preparePayloadIfTimehasCome();
}

#endif
33
#endif