LoRaMAC  4.4.6
Documentation of the API
RegionNvm.h
Go to the documentation of this file.
1 
33 #ifndef __REGIONNVM_H__
34 #define __REGIONNVM_H__
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 #include "LoRaMacTypes.h"
42 
43 // Selection of REGION_NVM_MAX_NB_CHANNELS
44 #if defined( REGION_CN470 )
45  #define REGION_NVM_MAX_NB_CHANNELS 96
46 #elif defined( REGION_US915 ) || defined( REGION_AU915 )
47  #define REGION_NVM_MAX_NB_CHANNELS 72
48 #elif defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
49  defined( REGION_EU433 ) || defined( REGION_EU868 ) || \
50  defined( REGION_IN865 ) || defined( REGION_KR920 )
51  #define REGION_NVM_MAX_NB_CHANNELS 16
52 #else
53  // Region_RU864
54  #define REGION_NVM_MAX_NB_CHANNELS 8
55 #endif
56 
57 // Selection of REGION_NVM_MAX_NB_BANDS
58 #if defined( REGION_EU868 )
59  #define REGION_NVM_MAX_NB_BANDS 6
60 #else
61  // All others
62  #define REGION_NVM_MAX_NB_BANDS 1
63 #endif
64 
65 // Selection of REGION_NVM_CHANNELS_MASK_SIZE
66 #if defined( REGION_CN470 ) || defined( REGION_US915 ) || \
67  defined( REGION_AU915 )
68  #define REGION_NVM_CHANNELS_MASK_SIZE 6
69 #else
70  // All others
71  #define REGION_NVM_CHANNELS_MASK_SIZE 1
72 #endif
73 
77 typedef struct sRegionNvmDataGroup1
78 {
82  Band_t Bands[ REGION_NVM_MAX_NB_BANDS ];
83 #if defined( REGION_US915 ) || defined( REGION_AU915 )
84 
87  uint16_t ChannelsMaskRemaining[ REGION_NVM_CHANNELS_MASK_SIZE ];
92  uint8_t JoinChannelGroupsCurrentIndex;
96  uint8_t JoinTrialsCounter;
97 #endif
98 
101  uint32_t Crc32;
103 
108 typedef struct sRegionNvmDataGroup2
109 {
113  ChannelParams_t Channels[ REGION_NVM_MAX_NB_CHANNELS ];
117  uint16_t ChannelsMask[ REGION_NVM_CHANNELS_MASK_SIZE ];
121  uint16_t ChannelsDefaultMask[ REGION_NVM_CHANNELS_MASK_SIZE ];
125  uint32_t Crc32;
127 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif // __REGIONNVM_H__
RegionNvmDataGroup1_t
Definition: RegionNvm.h:77
LoRaMacTypes.h
LoRa MAC layer internal types definition. Please do not include in application sources.
Band_t
Definition: LoRaMacTypes.h:1093
ChannelParams_t
Definition: LoRaMacTypes.h:1165
RegionNvmDataGroup2_t
Definition: RegionNvm.h:108
RegionNvmDataGroup1_t::Crc32
uint32_t Crc32
Definition: RegionNvm.h:101