light sensor

Dependencies:   X_NUCLEO_IKS01A1 LoRaWAN-lib SX1276Lib mbed

Fork of LoRaWAN-SX1276-Application-Demo by Uttam Bhat

Committer:
ubhat
Date:
Sat Sep 09 00:26:19 2017 +0000
Revision:
6:25f847c99aa2
Parent:
0:42863a11464a
Changed packet format to Senet Packet Format for numeric stream on M2X

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ubhat 0:42863a11464a 1 /*
ubhat 0:42863a11464a 2 / _____) _ | |
ubhat 0:42863a11464a 3 ( (____ _____ ____ _| |_ _____ ____| |__
ubhat 0:42863a11464a 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
ubhat 0:42863a11464a 5 _____) ) ____| | | || |_| ____( (___| | | |
ubhat 0:42863a11464a 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
ubhat 0:42863a11464a 7 (C)2015 Semtech
ubhat 0:42863a11464a 8
ubhat 0:42863a11464a 9 Description: Extern declaration of parameters defined in main.cpp
ubhat 0:42863a11464a 10
ubhat 0:42863a11464a 11 License: Revised BSD License, see LICENSE.TXT file include in the project
ubhat 0:42863a11464a 12
ubhat 0:42863a11464a 13 Maintainer: Uttam Bhat
ubhat 0:42863a11464a 14 */
ubhat 0:42863a11464a 15 #ifndef __COMMON_H__
ubhat 0:42863a11464a 16 #define __COMMON_H__
ubhat 0:42863a11464a 17
ubhat 0:42863a11464a 18 #include "Comissioning.h"
ubhat 0:42863a11464a 19 #include "board.h"
ubhat 0:42863a11464a 20
ubhat 0:42863a11464a 21 /*!
ubhat 0:42863a11464a 22 * User application data buffer size
ubhat 0:42863a11464a 23 */
ubhat 0:42863a11464a 24 #define LORAWAN_APP_DATA_MAX_SIZE 64
ubhat 0:42863a11464a 25
ubhat 0:42863a11464a 26 /*!
ubhat 0:42863a11464a 27 * Current network ID
ubhat 0:42863a11464a 28 */
ubhat 0:42863a11464a 29 #define LORAWAN_NETWORK_ID ( uint32_t )0
ubhat 0:42863a11464a 30
ubhat 0:42863a11464a 31
ubhat 0:42863a11464a 32 #if( OVER_THE_AIR_ACTIVATION != 0 )
ubhat 0:42863a11464a 33 /*!
ubhat 0:42863a11464a 34 * Over the Air Activation
ubhat 0:42863a11464a 35 */
ubhat 0:42863a11464a 36
ubhat 0:42863a11464a 37 extern uint8_t DevEui[];
ubhat 0:42863a11464a 38 extern uint8_t AppEui[];
ubhat 0:42863a11464a 39 extern uint8_t AppKey[];
ubhat 0:42863a11464a 40
ubhat 0:42863a11464a 41 #else
ubhat 0:42863a11464a 42 /*!
ubhat 0:42863a11464a 43 * Activation by Personalization
ubhat 0:42863a11464a 44 */
ubhat 0:42863a11464a 45
ubhat 0:42863a11464a 46 extern uint8_t NwkSKey[];
ubhat 0:42863a11464a 47 extern uint8_t AppSKey[];
ubhat 0:42863a11464a 48 extern uint32_t DevAddr;
ubhat 0:42863a11464a 49
ubhat 0:42863a11464a 50 #endif
ubhat 0:42863a11464a 51
ubhat 0:42863a11464a 52 extern uint8_t AppData[LORAWAN_APP_DATA_MAX_SIZE]; // User application data size
ubhat 0:42863a11464a 53
ubhat 0:42863a11464a 54 extern uint8_t AppPort; // Application port
ubhat 0:42863a11464a 55
ubhat 0:42863a11464a 56 extern uint8_t AppDataSize; // Application size
ubhat 0:42863a11464a 57
ubhat 0:42863a11464a 58 extern uint8_t IsTxConfirmed; // Indicates if the node is sending confirmed or unconfirmed messages
ubhat 0:42863a11464a 59
ubhat 0:42863a11464a 60 extern bool IsTxIntUpdate; // Indicates if a new transmit interrupt can be set
ubhat 0:42863a11464a 61
ubhat 0:42863a11464a 62 extern bool NextTx; // Indicates if a new packet can be sent
ubhat 0:42863a11464a 63
ubhat 0:42863a11464a 64 extern bool IsNetworkJoinedStatusUpdate; // Indicates if the MAC layer network join status has changed.
ubhat 0:42863a11464a 65
ubhat 0:42863a11464a 66 extern bool IsTxUpdate; // Indicates if the message sent
ubhat 0:42863a11464a 67
ubhat 0:42863a11464a 68 extern bool IsRxUpdate; // Indicates if the message received in the RX window.
ubhat 0:42863a11464a 69
ubhat 0:42863a11464a 70 extern TimerEvent_t TxNextPacketTimer; // Timer to handle the application data transmission duty cycle
ubhat 0:42863a11464a 71
ubhat 0:42863a11464a 72 #endif // __COMMON_H__