Application example using LoRaWAN-lib MAC layer implementation for STM32 + SX1276 on OpenChirp
Dependencies: mbed LoRaWAN-lib SX1276Lib
board/board.h@13:779fef3e4573, 2019-09-15 (annotated)
- Committer:
- nimita23
- Date:
- Sun Sep 15 17:10:06 2019 +0000
- Revision:
- 13:779fef3e4573
- Parent:
- 10:715b2204399b
led working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mluis | 0:92bca02df485 | 1 | /* |
mluis | 0:92bca02df485 | 2 | / _____) _ | | |
mluis | 0:92bca02df485 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
mluis | 0:92bca02df485 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
mluis | 0:92bca02df485 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
mluis | 0:92bca02df485 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
mluis | 0:92bca02df485 | 7 | (C)2015 Semtech |
mluis | 0:92bca02df485 | 8 | |
mluis | 0:92bca02df485 | 9 | Description: Target board general functions implementation |
mluis | 0:92bca02df485 | 10 | |
mluis | 0:92bca02df485 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
mluis | 0:92bca02df485 | 12 | |
mluis | 0:92bca02df485 | 13 | Maintainer: Miguel Luis and Gregory Cristian |
mluis | 0:92bca02df485 | 14 | */ |
mluis | 0:92bca02df485 | 15 | #ifndef __BOARD_H__ |
mluis | 0:92bca02df485 | 16 | #define __BOARD_H__ |
mluis | 0:92bca02df485 | 17 | |
mluis | 0:92bca02df485 | 18 | #include "mbed.h" |
mluis | 1:352f608c3337 | 19 | #include "system/timer.h" |
mluis | 1:352f608c3337 | 20 | #include "system/utilities.h" |
mluis | 1:352f608c3337 | 21 | #include "sx1276-hal.h" |
mluis | 1:352f608c3337 | 22 | |
nimita23 | 10:715b2204399b | 23 | #define USE_BAND_915 |
mluis | 1:352f608c3337 | 24 | |
mluis | 1:352f608c3337 | 25 | extern SX1276MB1xAS Radio; |
mluis | 0:92bca02df485 | 26 | |
mluis | 0:92bca02df485 | 27 | /*! |
mluis | 9:ee9dcbb9708d | 28 | * \brief Disable interrupts |
mluis | 9:ee9dcbb9708d | 29 | * |
mluis | 9:ee9dcbb9708d | 30 | * \remark IRQ nesting is managed |
mluis | 9:ee9dcbb9708d | 31 | */ |
mluis | 9:ee9dcbb9708d | 32 | void BoardDisableIrq( void ); |
mluis | 9:ee9dcbb9708d | 33 | |
mluis | 9:ee9dcbb9708d | 34 | /*! |
mluis | 9:ee9dcbb9708d | 35 | * \brief Enable interrupts |
mluis | 9:ee9dcbb9708d | 36 | * |
mluis | 9:ee9dcbb9708d | 37 | * \remark IRQ nesting is managed |
mluis | 9:ee9dcbb9708d | 38 | */ |
mluis | 9:ee9dcbb9708d | 39 | void BoardEnableIrq( void ); |
mluis | 9:ee9dcbb9708d | 40 | |
mluis | 9:ee9dcbb9708d | 41 | /*! |
mluis | 0:92bca02df485 | 42 | * \brief Initializes the target board peripherals. |
mluis | 0:92bca02df485 | 43 | */ |
mluis | 0:92bca02df485 | 44 | void BoardInit( void ); |
mluis | 0:92bca02df485 | 45 | |
mluis | 0:92bca02df485 | 46 | /*! |
mluis | 0:92bca02df485 | 47 | * \brief Measure the Battery level |
mluis | 0:92bca02df485 | 48 | * |
mluis | 0:92bca02df485 | 49 | * \retval value battery level ( 0: very low, 254: fully charged ) |
mluis | 0:92bca02df485 | 50 | */ |
mluis | 1:352f608c3337 | 51 | uint8_t BoardGetBatteryLevel( void ); |
mluis | 0:92bca02df485 | 52 | |
mluis | 0:92bca02df485 | 53 | #endif // __BOARD_H__ |