region.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 HAW Hamburg
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 
18 #ifndef NET_GNRC_LORAWAN_REGION_H
19 #define NET_GNRC_LORAWAN_REGION_H
20 
21 #include "kernel_defines.h"
22 #include "net/gnrc/lorawan.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 static const uint32_t gnrc_lorawan_default_channels[] = {
32 #if (IS_ACTIVE(CONFIG_LORAMAC_REGION_EU_868))
33  868100000UL,
34  868300000UL,
35  868500000UL
36 #elif (IS_ACTIVE(CONFIG_LORAMAC_REGION_IN_865))
37  865062500UL,
38  865402500UL,
39  865985000UL
40 #endif
41 };
42 
43 #define GNRC_LORAWAN_DEFAULT_CHANNELS_NUMOF \
44  ARRAY_SIZE(gnrc_lorawan_default_channels)
52 void gnrc_lorawan_process_cflist(gnrc_lorawan_t *mac, uint8_t *cflist);
53 
62 uint8_t gnrc_lorawan_rx1_get_dr_offset(uint8_t dr_up, uint8_t dr_offset);
63 
72 bool gnrc_lorawan_validate_dr(uint8_t dr);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* NET_GNRC_LORAWAN_REGION_H */
gnrc_lorawan_validate_dr
bool gnrc_lorawan_validate_dr(uint8_t dr)
Check if a datarate is valid in the current region.
kernel_defines.h
Common macros and compiler attributes/pragmas configuration.
lorawan.h
GNRC LoRaWAN API definition.
gnrc_lorawan_default_channels
static const uint32_t gnrc_lorawan_default_channels[]
Default LoRaWAN channels.
Definition: region.h:31
gnrc_lorawan_rx1_get_dr_offset
uint8_t gnrc_lorawan_rx1_get_dr_offset(uint8_t dr_up, uint8_t dr_offset)
Get the datarate of the first reception windows.