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:
- 6:3dbddff60dc9
- Parent:
- 4:90bd79f1b458
- Child:
- 7:91ad5308e1a2
--- a/sx1272/sx1272-hal.cpp Thu May 19 18:30:44 2016 +0000
+++ b/sx1272/sx1272-hal.cpp Fri Jun 10 17:25:26 2016 +0000
@@ -74,6 +74,10 @@
: SX1272( events, LORA_MOSI, LORA_MISO, LORA_SCK, LORA_NSS, LORA_RESET, LORA_DIO0, LORA_DIO1, LORA_DIO2, LORA_DIO3, LORA_DIO4, LORA_DIO5 ),
TxCtl( LORA_TXCTL ),
RxCtl( LORA_RXCTL )
+ #elif defined ( TARGET_MBED_LPC1768 )
+ : SX1272( events, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 ),
+ AntSwitch( p16 ),
+ Fake( p17 )
#else
: SX1272( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, D8, D9 ),
AntSwitch( A4 ),
@@ -111,6 +115,8 @@
boardConnected = NA_MOTE_72;
#elif defined ( TARGET_MTS_MDOT_F411RE )
boardConnected = MDOT_F411RE;
+#elif defined ( TARGET_MBED_LPC1768 )
+ boardConnected = LPC1768_RFM95;
#else
this->AntSwitch.input( );
wait_ms( 1 );
@@ -150,7 +156,7 @@
nss = 1;
spi.format( 8,0 );
uint32_t frequencyToSet = 8000000;
- #if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_MOTE_L152RC ) || defined ( TARGET_LPC11U6X ) || defined ( TARGET_MTS_MDOT_F411RE ) )
+ #if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_MOTE_L152RC ) || defined ( TARGET_LPC11U6X ) || defined ( TARGET_MTS_MDOT_F411RE ) || defined ( TARGET_MBED_LPC1768 ) )
spi.frequency( frequencyToSet );
#elif( defined ( TARGET_KL25Z ) ) //busclock frequency is halved -> double the spi frequency to compensate
spi.frequency( frequencyToSet * 2 );
@@ -183,7 +189,7 @@
uint8_t SX1272MB2xAS::GetPaSelect( uint32_t channel )
{
- if( boardConnected == SX1272MB1DCS || boardConnected == MDOT_F411RE )
+ if( boardConnected == SX1272MB1DCS || boardConnected == MDOT_F411RE || boardConnected == LPC1768_RFM95 )
{
return RF_PACONFIG_PASELECT_PABOOST;
}
