Loading...
Searching...
No Matches
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 "modules.h"
22#include "net/gnrc/lorawan.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
31static 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)
52void gnrc_lorawan_process_cflist(gnrc_lorawan_t *mac, uint8_t *cflist);
53
62uint8_t gnrc_lorawan_rx1_get_dr_offset(uint8_t dr_up, uint8_t dr_offset);
63
72bool gnrc_lorawan_validate_dr(uint8_t dr);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* NET_GNRC_LORAWAN_REGION_H */
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:31
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.