GPS working with LoRa code - can't transmit faster that once every 6 seconds
Dependencies: mbed LoRaWAN-lib_gps_lora SingleFrequencyLora
board/board.cpp@15:b4d11baea8bc, 2017-11-29 (annotated)
- Committer:
- Rishin
- Date:
- Wed Nov 29 15:01:09 2017 +0000
- Revision:
- 15:b4d11baea8bc
- Parent:
- 13:66d854ad31d8
publishining gps with lora
Who changed what in which revision?
User | Revision | Line number | New 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 | } |