Mistake on this page?
Report an issue in GitHub or email us
loraphy_target.h
1 /**
2  * Copyright (c) 2017, Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef LORAPHY_TARGET
19 #define LORAPHY_TARGET
20 
21 #ifdef MBED_CONF_LORA_PHY
22 
23 #define LORA_REGION_EU868 0x10
24 #define LORA_REGION_AS923 0x11
25 #define LORA_REGION_AU915 0x12
26 #define LORA_REGION_CN470 0x13
27 #define LORA_REGION_CN779 0x14
28 #define LORA_REGION_EU433 0x15
29 #define LORA_REGION_IN865 0x16
30 #define LORA_REGION_KR920 0x17
31 #define LORA_REGION_US915 0x18
32 
33 //DO NOT USE integer values in mbed_app.json!
34 //These are defined for backward compatibility and
35 //Will be DEPRECATED in the future
36 #define LORA_REGION_0 0x10
37 #define LORA_REGION_1 0x11
38 #define LORA_REGION_2 0x12
39 #define LORA_REGION_3 0x13
40 #define LORA_REGION_4 0x14
41 #define LORA_REGION_5 0x15
42 #define LORA_REGION_6 0x16
43 #define LORA_REGION_7 0x17
44 #define LORA_REGION_8 0x18
45 
46 //Since 0 would be equal to any undefined value we need to handle this in a other way
47 #define mbed_lora_concat_(x) LORA_REGION_##x
48 #define mbed_lora_concat(x) mbed_lora_concat_(x)
49 #define LORA_REGION mbed_lora_concat(MBED_CONF_LORA_PHY)
50 
51 #if LORA_REGION == LORA_REGION_EU868
53 #define LoRaPHY_region LoRaPHYEU868
54 #elif LORA_REGION == LORA_REGION_AS923
56 #define LoRaPHY_region LoRaPHYAS923
57 #elif LORA_REGION == LORA_REGION_AU915
59 #define LoRaPHY_region LoRaPHYAU915
60 #elif LORA_REGION == LORA_REGION_CN470
62 #define LoRaPHY_region LoRaPHYCN470
63 #elif LORA_REGION == LORA_REGION_CN779
65 #define LoRaPHY_region LoRaPHYCN779
66 #elif LORA_REGION == LORA_REGION_EU433
68 #define LoRaPHY_region LoRaPHYEU433
69 #elif LORA_REGION == LORA_REGION_IN865
71 #define LoRaPHY_region LoRaPHYIN865
72 #elif LORA_REGION == LORA_REGION_KR920
74 #define LoRaPHY_region LoRaPHYKR920
75 #elif LORA_REGION == LORA_REGION_US915
77 #define LoRaPHY_region LoRaPHYUS915
78 #else
79 #error "Invalid region configuration, update mbed_app.json with correct MBED_CONF_LORA_PHY value"
80 #endif //MBED_CONF_LORA_PHY == VALUE
81 #else
82 #error "Must set LoRa PHY layer parameters."
83 #endif //MBED_CONF_LORA_PHY
84 
85 #endif // LORAPHY_TARGET
86 
Implements LoRaPHY for Indian 865 MHz band.
Implements LoRaPHY for Korean 920 MHz band.
Implements LoRaPHY for Asia-Pacific 923 MHz band.
Implements LoRaPHY for European 433 MHz band.
Implements LoRaPHY for Chinese 779 MHz band.
Implements LoRaPHY for European 868 MHz band.
Implements LoRaPHY for US 915 MHz band.
Implements LoRaPHY for Chinese 470 MHz band.
Implements LoRaPHY for Australian 915 MHz band.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.