This Library is to establish communication between a transmitter and receivers formed by the combination of SX1272MB2DAS shield and FRDM kl25z board that uses Cortex M0+ architecture.

Fork of SX1272Lib by Semtech

Files at this revision

API Documentation at this revision

Comitter:
mluis
Date:
Tue Sep 13 12:15:43 2016 +0000
Parent:
5:e90cbf646eb1
Commit message:
Added NUCLEO-L476RG 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	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 );