mQ Branch for NA mote testing
Dependencies: LoRaWAN-lib SX1272Lib-mQ lib_gps lib_mma8451q lib_mpl3115a2 mbed
Fork of LoRaWAN-NAMote72-Application-Demo by
app/Common.h@18:18408c3c2d0c, 2017-04-24 (annotated)
- Committer:
- mluis
- Date:
- Mon Apr 24 13:47:27 2017 +0000
- Revision:
- 18:18408c3c2d0c
- Parent:
- 9:617844f7fdb1
WARNING: Radio API timings changed from micro-seconds to milliseconds; ; Synchronized with https://github.com/Lora-net/LoRaMac-node git revision e506c246652fa44c3f24cecb89d0707b49ece739; Updated all libraries to the latest versions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ubhat | 0:69f2e28d12c1 | 1 | /* |
ubhat | 0:69f2e28d12c1 | 2 | / _____) _ | | |
ubhat | 0:69f2e28d12c1 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
ubhat | 0:69f2e28d12c1 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
ubhat | 0:69f2e28d12c1 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
ubhat | 0:69f2e28d12c1 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
ubhat | 0:69f2e28d12c1 | 7 | (C)2015 Semtech |
ubhat | 0:69f2e28d12c1 | 8 | |
ubhat | 0:69f2e28d12c1 | 9 | Description: Extern declaration of parameters defined in main.cpp |
ubhat | 0:69f2e28d12c1 | 10 | |
ubhat | 0:69f2e28d12c1 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
ubhat | 0:69f2e28d12c1 | 12 | |
ubhat | 0:69f2e28d12c1 | 13 | Maintainer: Uttam Bhat |
ubhat | 0:69f2e28d12c1 | 14 | */ |
ubhat | 0:69f2e28d12c1 | 15 | #ifndef __COMMON_H__ |
ubhat | 0:69f2e28d12c1 | 16 | #define __COMMON_H__ |
ubhat | 0:69f2e28d12c1 | 17 | |
mluis | 18:18408c3c2d0c | 18 | #include "Commissioning.h" |
ubhat | 0:69f2e28d12c1 | 19 | #include "board.h" |
ubhat | 0:69f2e28d12c1 | 20 | |
ubhat | 0:69f2e28d12c1 | 21 | /*! |
ubhat | 0:69f2e28d12c1 | 22 | * User application data buffer size |
ubhat | 0:69f2e28d12c1 | 23 | */ |
mluis | 18:18408c3c2d0c | 24 | #define LORAWAN_APP_DATA_MAX_SIZE 242 |
ubhat | 0:69f2e28d12c1 | 25 | |
ubhat | 9:617844f7fdb1 | 26 | /*! |
ubhat | 9:617844f7fdb1 | 27 | * Current network ID |
ubhat | 9:617844f7fdb1 | 28 | */ |
ubhat | 9:617844f7fdb1 | 29 | #define LORAWAN_NETWORK_ID ( uint32_t )0 |
ubhat | 9:617844f7fdb1 | 30 | |
mluis | 18:18408c3c2d0c | 31 | /* |
mluis | 18:18408c3c2d0c | 32 | * Indicates if the end-device is currently activated by OTAA procedure. |
mluis | 18:18408c3c2d0c | 33 | */ |
mluis | 18:18408c3c2d0c | 34 | extern bool Otaa; |
ubhat | 0:69f2e28d12c1 | 35 | |
ubhat | 0:69f2e28d12c1 | 36 | /*! |
ubhat | 0:69f2e28d12c1 | 37 | * Over the Air Activation |
ubhat | 0:69f2e28d12c1 | 38 | */ |
ubhat | 0:69f2e28d12c1 | 39 | |
ubhat | 0:69f2e28d12c1 | 40 | extern uint8_t DevEui[]; |
ubhat | 0:69f2e28d12c1 | 41 | extern uint8_t AppEui[]; |
ubhat | 0:69f2e28d12c1 | 42 | extern uint8_t AppKey[]; |
ubhat | 0:69f2e28d12c1 | 43 | |
mluis | 18:18408c3c2d0c | 44 | #if( OVER_THE_AIR_ACTIVATION == 0 ) |
ubhat | 0:69f2e28d12c1 | 45 | /*! |
ubhat | 0:69f2e28d12c1 | 46 | * Activation by Personalization |
ubhat | 0:69f2e28d12c1 | 47 | */ |
ubhat | 0:69f2e28d12c1 | 48 | |
ubhat | 0:69f2e28d12c1 | 49 | extern uint8_t NwkSKey[]; |
ubhat | 0:69f2e28d12c1 | 50 | extern uint8_t AppSKey[]; |
ubhat | 0:69f2e28d12c1 | 51 | extern uint32_t DevAddr; |
ubhat | 0:69f2e28d12c1 | 52 | |
ubhat | 0:69f2e28d12c1 | 53 | #endif |
ubhat | 0:69f2e28d12c1 | 54 | |
ubhat | 0:69f2e28d12c1 | 55 | extern uint8_t AppData[LORAWAN_APP_DATA_MAX_SIZE]; // User application data size |
ubhat | 0:69f2e28d12c1 | 56 | |
ubhat | 0:69f2e28d12c1 | 57 | extern uint8_t AppPort; // Application port |
ubhat | 0:69f2e28d12c1 | 58 | |
ubhat | 0:69f2e28d12c1 | 59 | extern uint8_t AppDataSize; // Application size |
ubhat | 0:69f2e28d12c1 | 60 | |
ubhat | 0:69f2e28d12c1 | 61 | extern uint8_t IsTxConfirmed; // Indicates if the node is sending confirmed or unconfirmed messages |
ubhat | 0:69f2e28d12c1 | 62 | |
ubhat | 5:6ffeac53b7cb | 63 | extern bool IsTxIntUpdate; // Indicates if a new transmit interrupt can be set |
ubhat | 5:6ffeac53b7cb | 64 | |
ubhat | 0:69f2e28d12c1 | 65 | extern bool NextTx; // Indicates if a new packet can be sent |
ubhat | 0:69f2e28d12c1 | 66 | |
ubhat | 0:69f2e28d12c1 | 67 | extern bool IsNetworkJoinedStatusUpdate; // Indicates if the MAC layer network join status has changed. |
ubhat | 0:69f2e28d12c1 | 68 | |
ubhat | 0:69f2e28d12c1 | 69 | extern bool IsTxUpdate; // Indicates if the message sent |
ubhat | 0:69f2e28d12c1 | 70 | |
ubhat | 0:69f2e28d12c1 | 71 | extern bool IsRxUpdate; // Indicates if the message received in the RX window. |
ubhat | 0:69f2e28d12c1 | 72 | |
ubhat | 0:69f2e28d12c1 | 73 | extern TimerEvent_t TxNextPacketTimer; // Timer to handle the application data transmission duty cycle |
ubhat | 0:69f2e28d12c1 | 74 | |
mluis | 18:18408c3c2d0c | 75 | #endif // __COMMON_H__ |