region.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2019 HAW Hamburg
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "modules.h"
19 #include "net/gnrc/lorawan.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
28 static const uint32_t gnrc_lorawan_default_channels[] = {
29 #if (IS_ACTIVE(CONFIG_LORAMAC_REGION_EU_868))
30  868100000UL,
31  868300000UL,
32  868500000UL
33 #elif (IS_ACTIVE(CONFIG_LORAMAC_REGION_IN_865))
34  865062500UL,
35  865402500UL,
36  865985000UL
37 #endif
38 };
39 
40 #define GNRC_LORAWAN_DEFAULT_CHANNELS_NUMOF \
41  ARRAY_SIZE(gnrc_lorawan_default_channels)
49 void gnrc_lorawan_process_cflist(gnrc_lorawan_t *mac, uint8_t *cflist);
50 
59 uint8_t gnrc_lorawan_rx1_get_dr_offset(uint8_t dr_up, uint8_t dr_offset);
60 
69 bool gnrc_lorawan_validate_dr(uint8_t dr);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
GNRC LoRaWAN API definition.
Common macros and compiler attributes/pragmas configuration.
uint8_t gnrc_lorawan_rx1_get_dr_offset(uint8_t dr_up, uint8_t dr_offset)
Get the datarate of the first reception windows.
static const uint32_t gnrc_lorawan_default_channels[]
Default LoRaWAN channels.
Definition: region.h:28
bool gnrc_lorawan_validate_dr(uint8_t dr)
Check if a datarate is valid in the current region.
void gnrc_lorawan_process_cflist(gnrc_lorawan_t *mac, uint8_t *cflist)
Process Channel Frequency list frame.
GNRC LoRaWAN mac descriptor.