Elmo board support
Fork of SX1272Lib by
Revision 6:896fb1b22cb9, committed 2016-05-25
- Comitter:
- Daniel_espo
- Date:
- Wed May 25 11:36:41 2016 +0000
- Parent:
- 5:e90cbf646eb1
- Commit message:
- Add Elmo board support
Changed in this revision
sx1272/sx1272-hal.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/sx1272/sx1272-hal.cpp Thu May 19 18:30:44 2016 +0000 +++ b/sx1272/sx1272-hal.cpp Wed May 25 11:36:41 2016 +0000 @@ -34,9 +34,10 @@ #elif defined ( TARGET_MTS_MDOT_F411RE ) TxCtl ( txctl ), RxCtl ( rxctl ) + #else AntSwitch( antSwitch ), - #if( defined ( TARGET_NUCLEO_L152RE ) ) + #if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_ELMO_F411RE ) ) Fake( D8 ) #else Fake( A3 ) @@ -74,6 +75,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_ELMO_F411RE ) + : SX1272( events, RF_SPI_MOSI, RF_SPI_MISO, RF_SPI_SCK, RF_SPI_CS, RF_RESET, RF_DIO0, RF_DIO1, RF_DIO2, RF_DIO3, RF_DIO4, RF_DIO5), + AntSwitch(RF_RXTX_SW ), + Fake(D8) #else : SX1272( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, D8, D9 ), AntSwitch( A4 ), @@ -150,7 +155,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_ELMO_F411RE ) ) spi.frequency( frequencyToSet ); #elif( defined ( TARGET_KL25Z ) ) //busclock frequency is halved -> double the spi frequency to compensate spi.frequency( frequencyToSet * 2 ); @@ -162,7 +167,7 @@ void SX1272MB2xAS::IoIrqInit( DioIrqHandler *irqHandlers ) { -#if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_MOTE_L152RC ) || defined ( TARGET_LPC11U6X ) ) +#if( defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_MOTE_L152RC ) || defined ( TARGET_LPC11U6X ) || defined ( TARGET_ELMO_F411RE ) ) dio0.mode( PullDown ); dio1.mode( PullDown ); dio2.mode( PullDown );