Library files for InAir9 module containing SX1272
Fork of SX1272Lib by
Diff: sx1272/sx1272-hal.cpp
- Revision:
- 6:69d5976b504d
- Parent:
- 4:90bd79f1b458
diff -r e90cbf646eb1 -r 69d5976b504d sx1272/sx1272-hal.cpp --- a/sx1272/sx1272-hal.cpp Thu May 19 18:30:44 2016 +0000 +++ b/sx1272/sx1272-hal.cpp Tue Sep 13 12:15:43 2016 +0000 @@ -36,7 +36,7 @@ RxCtl ( rxctl ) #else AntSwitch( antSwitch ), - #if( defined ( TARGET_NUCLEO_L152RE ) ) + #if( defined ( TARGET_NUCLEO_L152RE ) ) || defined ( TARGET_NUCLEO_L476RG ) Fake( D8 ) #else Fake( A3 ) @@ -61,7 +61,7 @@ } SX1272MB2xAS::SX1272MB2xAS( RadioEvents_t *events ) - #if defined ( TARGET_NUCLEO_L152RE ) + #if defined ( TARGET_NUCLEO_L152RE ) || defined ( TARGET_NUCLEO_L476RG ) : SX1272( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, A3, D9 ), // For NUCLEO L152RE dio4 is on port A3 AntSwitch( A4 ), Fake( D8 ) @@ -150,7 +150,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_NUCLEO_L476RG ) || defined ( TARGET_LPC11U6X ) || defined ( TARGET_MTS_MDOT_F411RE ) ) spi.frequency( frequencyToSet ); #elif( defined ( TARGET_KL25Z ) ) //busclock frequency is halved -> double the spi frequency to compensate spi.frequency( frequencyToSet * 2 ); @@ -162,7 +162,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_NUCLEO_L476RG ) || defined ( TARGET_NUCLEO_L476RG ) || defined ( TARGET_LPC11U6X ) ) dio0.mode( PullDown ); dio1.mode( PullDown ); dio2.mode( PullDown );