![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
V03 config RTC+envoie 1 donnée/seconde
Dependencies: mbed LoRaWAN-lib SX1272Lib
board/board.cpp@10:1a85ff06be1a, 2019-01-23 (annotated)
- Committer:
- MGstic
- Date:
- Wed Jan 23 16:28:51 2019 +0000
- Revision:
- 10:1a85ff06be1a
- Parent:
- 7:5077515c163b
V03
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mluis | 0:45496a70a8a5 | 1 | /* |
mluis | 0:45496a70a8a5 | 2 | / _____) _ | | |
mluis | 0:45496a70a8a5 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
mluis | 0:45496a70a8a5 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
mluis | 0:45496a70a8a5 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
mluis | 0:45496a70a8a5 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
mluis | 0:45496a70a8a5 | 7 | (C)2015 Semtech |
mluis | 0:45496a70a8a5 | 8 | |
mluis | 0:45496a70a8a5 | 9 | Description: Target board general functions implementation |
mluis | 0:45496a70a8a5 | 10 | |
mluis | 0:45496a70a8a5 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
mluis | 0:45496a70a8a5 | 12 | |
mluis | 0:45496a70a8a5 | 13 | Maintainer: Miguel Luis and Gregory Cristian |
mluis | 0:45496a70a8a5 | 14 | */ |
mluis | 0:45496a70a8a5 | 15 | #include "mbed.h" |
mluis | 0:45496a70a8a5 | 16 | #include "board.h" |
mluis | 0:45496a70a8a5 | 17 | |
mluis | 1:263aa4ff29cd | 18 | SX1272MB2xAS Radio( NULL ); |
mluis | 0:45496a70a8a5 | 19 | |
mluis | 7:5077515c163b | 20 | /*! |
mluis | 7:5077515c163b | 21 | * Nested interrupt counter. |
mluis | 7:5077515c163b | 22 | * |
mluis | 7:5077515c163b | 23 | * \remark Interrupt should only be fully disabled once the value is 0 |
mluis | 7:5077515c163b | 24 | */ |
mluis | 7:5077515c163b | 25 | static uint8_t IrqNestLevel = 0; |
mluis | 7:5077515c163b | 26 | |
mluis | 7:5077515c163b | 27 | void BoardDisableIrq( void ) |
mluis | 7:5077515c163b | 28 | { |
mluis | 7:5077515c163b | 29 | __disable_irq( ); |
mluis | 7:5077515c163b | 30 | IrqNestLevel++; |
mluis | 7:5077515c163b | 31 | } |
mluis | 7:5077515c163b | 32 | |
mluis | 7:5077515c163b | 33 | void BoardEnableIrq( void ) |
mluis | 7:5077515c163b | 34 | { |
mluis | 7:5077515c163b | 35 | IrqNestLevel--; |
mluis | 7:5077515c163b | 36 | if( IrqNestLevel == 0 ) |
mluis | 7:5077515c163b | 37 | { |
mluis | 7:5077515c163b | 38 | __enable_irq( ); |
mluis | 7:5077515c163b | 39 | } |
mluis | 7:5077515c163b | 40 | } |
mluis | 7:5077515c163b | 41 | |
mluis | 0:45496a70a8a5 | 42 | void BoardInit( void ) |
mluis | 0:45496a70a8a5 | 43 | { |
mluis | 0:45496a70a8a5 | 44 | TimerTimeCounterInit( ); |
mluis | 0:45496a70a8a5 | 45 | } |
mluis | 0:45496a70a8a5 | 46 | |
mluis | 0:45496a70a8a5 | 47 | |
mluis | 0:45496a70a8a5 | 48 | uint8_t BoardGetBatteryLevel( void ) |
mluis | 0:45496a70a8a5 | 49 | { |
mluis | 0:45496a70a8a5 | 50 | return 0xFE; |
mluis | 0:45496a70a8a5 | 51 | } |