-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.h
53 lines (47 loc) · 1.21 KB
/
app.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* @file app.h
* @author Bernd Giesecke ([email protected])
* @brief Defines, includes, global definitions
* @version 0.1
* @date 2023-05-04
*
* @copyright Copyright (c) 2023
*
*/
#include <Arduino.h>
// Debug
// Debug output set to 0 to disable app debug output
#ifndef MY_DEBUG
#define MY_DEBUG 1
#endif
#if MY_DEBUG > 0
#define MYLOG(tag, ...) \
do \
{ \
if (tag) \
Serial.printf("[%s] ", tag); \
Serial.printf(__VA_ARGS__); \
Serial.printf("\n"); \
} while (0); \
delay(100)
#else
#define MYLOG(...)
#endif
// Forward declarations
void send_packet(void);
bool init_status_at(void);
bool init_interval_at(void);
bool get_at_setting(void);
bool save_at_setting(void);
/** Custom flash parameters structure */
struct custom_param_s
{
uint8_t valid_flag = 0xAA;
uint32_t send_interval = 0;
};
/** Custom flash parameters */
extern custom_param_s custom_parameters;
// LoRaWAN stuff
#include "wisblock_cayenne.h"
// Cayenne LPP Channel numbers per sensor value
#define LPP_CHANNEL_BATT 1 // Base Board