Semtech LoRaWAN-demo configured for 915MHz operation and multi-radio support (SX1276/SX1272)

Dependencies:   mbed LoRaWAN-lib SX1272Lib SX1276Lib

Fork of LoRaWAN-demo-72 by Semtech

board/board.cpp

Committer:
shaunkrnelson
Date:
2017-06-28
Revision:
9:3811f426252c
Parent:
8:a35d5c979745

File content as of revision 9:3811f426252c:

/*
 / _____)             _              | |
( (____  _____ ____ _| |_ _____  ____| |__
 \____ \| ___ |    (_   _) ___ |/ ___)  _ \
 _____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
    (C)2015 Semtech

Description: Target board general functions implementation

License: Revised BSD License, see LICENSE.TXT file include in the project

Maintainer: Miguel Luis and Gregory Cristian
*/
#include "mbed.h"
#include "board.h"

#ifdef USE_SX1276
#warning board.cpp USE_SX1276
SX1276MB1xAS Radio( NULL );
#else
SX1272MB2xAS Radio( NULL );
#endif

/*!
 * Nested interrupt counter.
 *
 * \remark Interrupt should only be fully disabled once the value is 0
 */
static uint8_t IrqNestLevel = 0;

void BoardDisableIrq( void )
{
    __disable_irq( );
    IrqNestLevel++;
}

void BoardEnableIrq( void )
{
    IrqNestLevel--;
    if( IrqNestLevel == 0 )
    {
        __enable_irq( );
    }
}

void BoardInit( void )
{
    TimerTimeCounterInit( );
}


uint8_t BoardGetBatteryLevel( void ) 
{
    return 0xFE;
}