|
18 | 18 | #ifndef LORAPHY_TARGET
|
19 | 19 | #define LORAPHY_TARGET
|
20 | 20 |
|
| 21 | +#define EU868 0 |
| 22 | +#define AS923 1 |
| 23 | +#define AU915 2 |
| 24 | +#define CN470 3 |
| 25 | +#define CN779 4 |
| 26 | +#define EU433 5 |
| 27 | +#define IN865 6 |
| 28 | +#define KR920 7 |
| 29 | +#define US915 8 |
| 30 | +#define US915_HYBRID 9 |
| 31 | + |
21 | 32 | #ifdef MBED_CONF_LORA_PHY
|
22 |
| - #if MBED_CONF_LORA_PHY == 0 |
| 33 | + #if MBED_CONF_LORA_PHY == EU868 |
23 | 34 | #include "lorawan/lorastack/phy/LoRaPHYEU868.h"
|
24 | 35 | #define LoRaPHY_region LoRaPHYEU868
|
25 |
| - #elif MBED_CONF_LORA_PHY == 1 |
| 36 | + #elif MBED_CONF_LORA_PHY == AS923 |
26 | 37 | #include "lorawan/lorastack/phy/LoRaPHYAS923.h"
|
27 | 38 | #define LoRaPHY_region LoRaPHYAS923
|
28 |
| - #elif MBED_CONF_LORA_PHY == 2 |
| 39 | + #elif MBED_CONF_LORA_PHY == AU915 |
29 | 40 | #include "lorawan/lorastack/phy/LoRaPHYAU915.h"
|
30 | 41 | #define LoRaPHY_region LoRaPHYAU915;
|
31 |
| - #elif MBED_CONF_LORA_PHY == 3 |
| 42 | + #elif MBED_CONF_LORA_PHY == CN470 |
32 | 43 | #include "lorawan/lorastack/phy/LoRaPHYCN470.h"
|
33 | 44 | #define LoRaPHY_region LoRaPHYCN470
|
34 |
| - #elif MBED_CONF_LORA_PHY == 4 |
| 45 | + #elif MBED_CONF_LORA_PHY == CN779 |
35 | 46 | #include "lorawan/lorastack/phy/LoRaPHYCN779.h"
|
36 | 47 | #define LoRaPHY_region LoRaPHYCN779
|
37 |
| - #elif MBED_CONF_LORA_PHY == 5 |
| 48 | + #elif MBED_CONF_LORA_PHY == EU433 |
38 | 49 | #include "lorawan/lorastack/phy/LoRaPHYEU433.h"
|
39 | 50 | #define LoRaPHY_region LoRaPHYEU433
|
40 |
| - #elif MBED_CONF_LORA_PHY == 6 |
| 51 | + #elif MBED_CONF_LORA_PHY == IN865 |
41 | 52 | #include "lorawan/lorastack/phy/LoRaPHYIN865.h"
|
42 | 53 | #define LoRaPHY_region LoRaPHYIN865
|
43 |
| - #elif MBED_CONF_LORA_PHY == 7 |
| 54 | + #elif MBED_CONF_LORA_PHY == KR920 |
44 | 55 | #include "lorawan/lorastack/phy/LoRaPHYKR920.h"
|
45 | 56 | #define LoRaPHY_region LoRaPHYKR920
|
46 |
| - #elif MBED_CONF_LORA_PHY == 8 |
| 57 | + #elif MBED_CONF_LORA_PHY == US915 |
47 | 58 | #include "lorawan/lorastack/phy/LoRaPHYUS915.h"
|
48 | 59 | #define LoRaPHY_region LoRaPHYUS915
|
49 |
| - #elif MBED_CONF_LORA_PHY == 9 |
| 60 | + #elif MBED_CONF_LORA_PHY == US915_HYBRID |
50 | 61 | #include "lorawan/lorastack/phy/LoRaPHYUS915Hybrid.h"
|
51 | 62 | #define LoRaPHY_region LoRaPHYUS915Hybrid
|
| 63 | + #else |
| 64 | + #error "Unsupported region, check your configuration." |
52 | 65 | #endif //MBED_CONF_LORA_PHY == VALUE
|
53 | 66 | #else
|
54 | 67 | #error "Must set LoRa PHY layer parameters."
|
|
0 commit comments