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.
Dependents: Nucleo_Private_LoRa
Diff: sx1276/sx1276-hal.cpp
- Revision:
- 28:9ee41259a3eb
- Parent:
- 25:3778e6204cc1
- Child:
- 29:cc4c7c1defca
--- a/sx1276/sx1276-hal.cpp Fri May 13 15:09:10 2016 +0000 +++ b/sx1276/sx1276-hal.cpp Wed Nov 25 08:17:26 2020 +0000 @@ -48,8 +48,8 @@ } SX1276MB1xAS::SX1276MB1xAS( RadioEvents_t *events ) - #if defined ( TARGET_NUCLEO_L152RE ) - : SX1276( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, A3, D9 ), // For NUCLEO L152RE dio4 is on port A3 + #if ( defined ( TARGET_NUCLEO_L152RE )|| defined ( TARGET_NUCLEO_L073RZ ) || defined ( TARGET_NUCLEO_L053R8 ) ) + : SX1276( events, D11, D12, D13, D10, D9, D8, D3, D4, D5, A3, A1 ), // For NUCLEO L152RE dio4 is on port A3 antSwitch( A4 ), fake( D8 ) #elif defined( TARGET_LPC11U6X ) @@ -93,7 +93,7 @@ { antSwitch.input( ); wait_ms( 1 ); - if( antSwitch == 1 ) + if(1 /* antSwitch == 1*/ ) { boardConnected = SX1276MB1LAS; } @@ -128,7 +128,7 @@ nss = 1; spi.format( 8,0 ); uint32_t frequencyToSet = 8000000; - #if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_LPC11U6X ) ) + #if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_LPC11U6X ) || defined ( TARGET_NUCLEO_L073RZ ) || defined ( TARGET_NUCLEO_L053R8 )) spi.frequency( frequencyToSet ); #elif( defined ( TARGET_KL25Z ) ) //busclock frequency is halved -> double the spi frequency to compensate spi.frequency( frequencyToSet * 2 ); @@ -140,7 +140,7 @@ void SX1276MB1xAS::IoIrqInit( DioIrqHandler *irqHandlers ) { -#if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_LPC11U6X ) ) +#if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_LPC11U6X ) || defined ( TARGET_NUCLEO_L073RZ ) || defined ( TARGET_NUCLEO_L053R8 ) ) dio0.mode( PullDown ); dio1.mode( PullDown ); dio2.mode( PullDown );