-
-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathdefines.h
62 lines (54 loc) · 1.72 KB
/
defines.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
54
55
56
57
58
59
60
61
62
//-----------------------------------------------------------------------------
// 2024 Ahoy, https://ahoydtu.de
// Creative Commons - https://creativecommons.org/licenses/by-nc-sa/4.0/deed
//-----------------------------------------------------------------------------
#ifndef __DEFINES_H__
#define __DEFINES_H__
#include "config/config.h"
//-------------------------------------
// VERSION
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 155
//-------------------------------------
typedef struct {
uint8_t ch;
uint8_t len;
int8_t rssi;
uint8_t packet[MAX_RF_PAYLOAD_SIZE];
uint16_t millis;
} packet_t;
typedef enum {
AbsolutNonPersistent = 0UL, // 0x0000
RelativNonPersistent = 1UL, // 0x0001
AbsolutPersistent = 256UL, // 0x0100
RelativPersistent = 257UL // 0x0101
} PowerLimitControlType;
union serial_u {
uint64_t u64;
uint8_t b[8];
};
enum {
DISP_TYPE_T0_NONE = 0,
DISP_TYPE_T1_SSD1306_128X64 = 1,
DISP_TYPE_T2_SH1106_128X64 = 2,
DISP_TYPE_T3_PCD8544_84X48 = 3,
DISP_TYPE_T4_SSD1306_128X32 = 4,
DISP_TYPE_T5_SSD1306_64X48 = 5,
DISP_TYPE_T6_SSD1309_128X64 = 6,
DISP_TYPE_T10_EPAPER = 10
};
typedef struct {
uint32_t rxFail;
uint32_t rxFailNoAnswer;
uint32_t rxSuccess;
uint32_t frmCnt;
uint32_t txCnt;
uint32_t retransmits;
uint16_t ivLoss; // lost frames (from GetLossRate)
uint16_t ivSent; // sent frames (from GetLossRate)
uint16_t dtuLoss; // current DTU lost frames (since last GetLossRate)
uint16_t dtuSent; // current DTU sent frames (since last GetLossRate)
} statistics_t;
#endif /*__DEFINES_H__*/