this is avaiable project
Fork of LoRaMacLib by
board/board.cpp
- Committer:
- Alliance
- Date:
- 2015-09-23
- Revision:
- 5:50aab2960e8c
- Parent:
- 4:c1d2d1319c8f
File content as of revision 5:50aab2960e8c:
/* / _____) _ | | ( (____ _____ ____ _| |_ _____ ____| |__ \____ \| ___ | (_ _) ___ |/ ___) _ \ _____) ) ____| | | || |_| ____( (___| | | | (______/|_____)_|_|_| \__)_____)\____)_| |_| (C)2013 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" #include "NVIC_set_all_priorities.h" /*! * Initializes the unused GPIO to a know status */ static void BoardUnusedIoInit( void ); /*! * Flag to indicate if the MCU is Initialized */ static bool McuInitialized = false; void BoardInitPeriph( void ) { } void BoardInitMcu( void ) { NVIC_set_all_irq_priorities( 4 ); // Disable Systick SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk; // Systick IRQ off SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk; // Clear SysTick Exception pending flag TimerHwInit( ); } void BoardDeInitMcu( void ) { } void BoardGetUniqueId( uint8_t *id ) { id[0] = ( ( *( uint32_t* )ID1 )+ ( *( uint32_t* )ID3 ) ) >> 24; id[1] = ( ( *( uint32_t* )ID1 )+ ( *( uint32_t* )ID3 ) ) >> 16; id[2] = ( ( *( uint32_t* )ID1 )+ ( *( uint32_t* )ID3 ) ) >> 8; id[3] = ( ( *( uint32_t* )ID1 )+ ( *( uint32_t* )ID3 ) ); id[4] = ( ( *( uint32_t* )ID2 ) ) >> 24; id[5] = ( ( *( uint32_t* )ID2 ) ) >> 16; id[6] = ( ( *( uint32_t* )ID2 ) ) >> 8; id[7] = ( ( *( uint32_t* )ID2 ) ); } uint8_t BoardMeasureBatterieLevel( void ) { return 0xFE; } static void BoardUnusedIoInit( void ) { }