GPS working with LoRa code - can't transmit faster that once every 6 seconds

Dependencies:   mbed LoRaWAN-lib_gps_lora SingleFrequencyLora

Committer:
Rishin
Date:
Fri Nov 24 15:20:12 2017 +0000
Revision:
13:66d854ad31d8
Valid GPS data sent over LoRa for roughly 7 mins with no crash

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rishin 13:66d854ad31d8 1 /*
Rishin 13:66d854ad31d8 2 / _____) _ | |
Rishin 13:66d854ad31d8 3 ( (____ _____ ____ _| |_ _____ ____| |__
Rishin 13:66d854ad31d8 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
Rishin 13:66d854ad31d8 5 _____) ) ____| | | || |_| ____( (___| | | |
Rishin 13:66d854ad31d8 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
Rishin 13:66d854ad31d8 7 (C)2015 Semtech
Rishin 13:66d854ad31d8 8
Rishin 13:66d854ad31d8 9 Description: Target board general functions implementation
Rishin 13:66d854ad31d8 10
Rishin 13:66d854ad31d8 11 License: Revised BSD License, see LICENSE.TXT file include in the project
Rishin 13:66d854ad31d8 12
Rishin 13:66d854ad31d8 13 Maintainer: Miguel Luis and Gregory Cristian
Rishin 13:66d854ad31d8 14 */
Rishin 13:66d854ad31d8 15 #include "mbed.h"
Rishin 13:66d854ad31d8 16 #include "board.h"
Rishin 13:66d854ad31d8 17
Rishin 13:66d854ad31d8 18 SX1276MB1xAS Radio( NULL );
Rishin 13:66d854ad31d8 19
Rishin 13:66d854ad31d8 20 /*!
Rishin 13:66d854ad31d8 21 * Nested interrupt counter.
Rishin 13:66d854ad31d8 22 *
Rishin 13:66d854ad31d8 23 * \remark Interrupt should only be fully disabled once the value is 0
Rishin 13:66d854ad31d8 24 */
Rishin 13:66d854ad31d8 25 static uint8_t IrqNestLevel = 0;
Rishin 13:66d854ad31d8 26
Rishin 13:66d854ad31d8 27 void BoardDisableIrq( void )
Rishin 13:66d854ad31d8 28 {
Rishin 13:66d854ad31d8 29 __disable_irq( );
Rishin 13:66d854ad31d8 30 IrqNestLevel++;
Rishin 13:66d854ad31d8 31 }
Rishin 13:66d854ad31d8 32
Rishin 13:66d854ad31d8 33 void BoardEnableIrq( void )
Rishin 13:66d854ad31d8 34 {
Rishin 13:66d854ad31d8 35 IrqNestLevel--;
Rishin 13:66d854ad31d8 36 if( IrqNestLevel == 0 )
Rishin 13:66d854ad31d8 37 {
Rishin 13:66d854ad31d8 38 __enable_irq( );
Rishin 13:66d854ad31d8 39 }
Rishin 13:66d854ad31d8 40 }
Rishin 13:66d854ad31d8 41
Rishin 13:66d854ad31d8 42 void BoardInit( void )
Rishin 13:66d854ad31d8 43 {
Rishin 13:66d854ad31d8 44 TimerTimeCounterInit( );
Rishin 13:66d854ad31d8 45 }
Rishin 13:66d854ad31d8 46
Rishin 13:66d854ad31d8 47
Rishin 13:66d854ad31d8 48 uint8_t BoardGetBatteryLevel( void )
Rishin 13:66d854ad31d8 49 {
Rishin 13:66d854ad31d8 50 return 0xFE;
Rishin 13:66d854ad31d8 51 }