Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SX1272Lib by
Diff: sx1272/sx1272-hal.cpp
- Revision:
- 9:4e1a35fd0ccd
- Parent:
- 8:bfdcd5c6ec14
- Child:
- 10:677a0290458a
diff -r bfdcd5c6ec14 -r 4e1a35fd0ccd sx1272/sx1272-hal.cpp
--- a/sx1272/sx1272-hal.cpp Wed Nov 30 17:35:51 2016 +0000
+++ b/sx1272/sx1272-hal.cpp Tue Dec 06 08:31:19 2016 +0000
@@ -212,13 +212,13 @@
void SX1272MB2xAS::SetRfTxPower( int8_t power )
{
-#if defined ( TARGET_MOTE_L152RC )
uint8_t paConfig = 0;
uint8_t paDac = 0;
paConfig = Read( REG_PACONFIG );
paDac = Read( REG_PADAC );
+#if defined ( TARGET_MOTE_L152RC )
if( power > 19 )
{
paConfig = ( paConfig & RF_PACONFIG_PASELECT_MASK ) | RF_PACONFIG_PASELECT_RFO;
@@ -229,8 +229,6 @@
paConfig = ( paConfig & RF_PACONFIG_PASELECT_MASK ) | RF_PACONFIG_PASELECT_PABOOST;
paConfig = ( paConfig & RFLR_PACONFIG_OUTPUTPOWER_MASK ) | PaBTable[power];
}
- Write( REG_PACONFIG, paConfig );
- Write( REG_PADAC, paDac );
#else
paConfig = ( paConfig & RF_PACONFIG_PASELECT_MASK ) | GetPaSelect( this->settings.Channel );
@@ -282,6 +280,8 @@
paConfig = ( paConfig & RFLR_PACONFIG_OUTPUTPOWER_MASK ) | ( uint8_t )( ( uint16_t )( power + 1 ) & 0x0F );
}
#endif
+ Write( REG_PACONFIG, paConfig );
+ Write( REG_PADAC, paDac );
}
uint8_t SX1272MB2xAS::GetPaSelect( uint32_t channel )
@@ -378,7 +378,6 @@
#else
this->AntSwitch = 0;
#endif
-
break;
default:
#if defined ( TARGET_MOTE_L152RC )
@@ -405,10 +404,10 @@
void SX1272MB2xAS::Reset( void )
{
- reset.output();
+ reset.output( );
reset = 0;
wait_ms( 1 );
- reset.input();
+ reset.input( );
wait_ms( 6 );
}
