lora.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef NET_LORA_H
22 #define NET_LORA_H
23 
24 #include <stdint.h>
25 #include <stdlib.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #ifndef LORA_FREQUENCY_RESOLUTION_DEFAULT
36 
37 #define LORA_FREQUENCY_RESOLUTION_DEFAULT (61.03515625)
38 #endif
39 #ifndef LORA_PREAMBLE_LENGTH_DEFAULT
40 
41 #define LORA_PREAMBLE_LENGTH_DEFAULT (8U)
42 #endif
43 #ifndef LORA_SYMBOL_TIMEOUT_DEFAULT
44 
45 #define LORA_SYMBOL_TIMEOUT_DEFAULT (10U)
46 #endif
47 #ifndef LORA_BW_DEFAULT
48 
49 #define LORA_BW_DEFAULT (LORA_BW_125_KHZ)
50 #endif
51 #ifndef LORA_SF_DEFAULT
52 
53 #define LORA_SF_DEFAULT (LORA_SF12)
54 #endif
55 #ifndef LORA_CR_DEFAULT
56 
57 #define LORA_CR_DEFAULT (LORA_CR_4_8)
58 #endif
59 #ifndef LORA_FIX_LENGTH_PAYLOAD_ON_DEFAULT
60 
61 #define LORA_FIX_LENGTH_PAYLOAD_ON_DEFAULT (false)
62 #endif
63 #ifndef LORA_IQ_INVERTED_DEFAULT
64 
65 #define LORA_IQ_INVERTED_DEFAULT (false)
66 #endif
67 #ifndef LORA_FREQUENCY_HOPPING_DEFAULT
68 
69 #define LORA_FREQUENCY_HOPPING_DEFAULT (false)
70 #endif
71 #ifndef LORA_FREQUENCY_HOPPING_PERIOD_DEFAULT
72 
73 #define LORA_FREQUENCY_HOPPING_PERIOD_DEFAULT (0U)
74 #endif
75 #ifndef LORA_FIXED_HEADER_LEN_MODE_DEFAULT
76 
77 #define LORA_FIXED_HEADER_LEN_MODE_DEFAULT (false)
78 #endif
79 #ifndef LORA_PAYLOAD_CRC_ON_DEFAULT
80 
81 #define LORA_PAYLOAD_CRC_ON_DEFAULT (true)
82 #endif
83 #ifndef LORA_PAYLOAD_LENGTH_DEFAULT
84 
85 #define LORA_PAYLOAD_LENGTH_DEFAULT (0U)
86 #endif
87 
93 #define LORA_SYNCWORD_PUBLIC (0x34)
94 #define LORA_SYNCWORD_PRIVATE (0x12)
104 enum {
108 };
109 
113 enum {
114  LORA_SF6 = 6,
121 };
122 
126 enum {
131 };
134 #ifdef __cplusplus
135 }
136 #endif
137 
138 #endif /* NET_LORA_H */
139 
spreading factor 12
Definition: lora.h:120
250 kHz bandwidth
Definition: lora.h:106
spreading factor 8
Definition: lora.h:116
coding rate 4/6
Definition: lora.h:128
spreading factor 9
Definition: lora.h:117
spreading factor 6
Definition: lora.h:114
coding rate 4/5
Definition: lora.h:127
125 kHz bandwidth
Definition: lora.h:105
spreading factor 10
Definition: lora.h:118
coding rate 4/7
Definition: lora.h:129
spreading factor 11
Definition: lora.h:119
coding rate 4/8
Definition: lora.h:130
stdlib.h wrapper for MSP430
500 kHz bandwidth
Definition: lora.h:107
spreading factor 7
Definition: lora.h:115