Semtech / LoRaWAN-NAMote72-Application-Demo

Dependencies:   LoRaWAN-lib mbed lib_mpl3115a2 lib_mma8451q lib_gps SX1272Lib

Dependents:   LoRaWAN-NAMote72-BVS-confirmed-tester-0-7v1_copy

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Common.h Source File

Common.h

00001 /*
00002  / _____)             _              | |
00003 ( (____  _____ ____ _| |_ _____  ____| |__
00004  \____ \| ___ |    (_   _) ___ |/ ___)  _ \
00005  _____) ) ____| | | || |_| ____( (___| | | |
00006 (______/|_____)_|_|_| \__)_____)\____)_| |_|
00007     (C)2015 Semtech
00008 
00009 Description: Extern declaration of parameters defined in main.cpp
00010 
00011 License: Revised BSD License, see LICENSE.TXT file include in the project
00012 
00013 Maintainer: Uttam Bhat
00014 */
00015 #ifndef __COMMON_H__
00016 #define __COMMON_H__
00017 
00018 #include "Commissioning.h"
00019 #include "board.h"
00020 
00021 /*!
00022  * User application data buffer size
00023  */
00024 #define LORAWAN_APP_DATA_MAX_SIZE                           242
00025 
00026 /*!
00027  * Current network ID
00028  */
00029 #define LORAWAN_NETWORK_ID                          ( uint32_t )0
00030 
00031 /*
00032  * Indicates if the end-device is currently activated by OTAA procedure.
00033  */
00034 extern bool Otaa;
00035 
00036 /*!
00037  * Over the Air Activation 
00038  */
00039 
00040 extern uint8_t DevEui[];
00041 extern uint8_t AppEui[];
00042 extern uint8_t AppKey[];
00043 
00044 #if( OVER_THE_AIR_ACTIVATION == 0 )
00045 /*!
00046  * Activation by Personalization 
00047  */
00048 
00049 extern uint8_t NwkSKey[];
00050 extern uint8_t AppSKey[];
00051 extern uint32_t DevAddr;
00052 
00053 #endif
00054 
00055 extern uint8_t AppData[LORAWAN_APP_DATA_MAX_SIZE]; //  User application data size
00056 
00057 extern uint8_t AppPort; // Application port
00058 
00059 extern uint8_t AppDataSize; // Application size
00060 
00061 extern uint8_t IsTxConfirmed; // Indicates if the node is sending confirmed or unconfirmed messages
00062 
00063 extern bool IsTxIntUpdate; // Indicates if a new transmit interrupt can be set
00064 
00065 extern bool NextTx; // Indicates if a new packet can be sent
00066 
00067 extern bool IsNetworkJoinedStatusUpdate; // Indicates if the MAC layer network join status has changed.
00068 
00069 extern bool IsTxUpdate; // Indicates if the message sent
00070 
00071 extern bool IsRxUpdate; // Indicates if the message received in the RX window.
00072 
00073 extern TimerEvent_t TxNextPacketTimer; // Timer to handle the application data transmission duty cycle
00074 
00075 #endif // __COMMON_H__