Przeglądaj źródła

moved pindefs from board to platformio.ini

recrof 11 miesięcy temu
rodzic
commit
9b9c7289e6
2 zmienionych plików z 13 dodań i 25 usunięć
  1. 2 18
      variants/t1000-e/T1000eBoard.h
  2. 11 7
      variants/t1000-e/platformio.ini

+ 2 - 18
variants/t1000-e/T1000eBoard.h

@@ -3,22 +3,6 @@
 #include <MeshCore.h>
 #include <Arduino.h>
 
-// LoRa and SPI pins
-#define  P_LORA_DIO_1   (32 + 1)  // P1.1
-#define  P_LORA_NSS     (0 + 12)  // P0.12
-#define  P_LORA_RESET   (32 + 10) // P1.10
-#define  P_LORA_BUSY    (0 + 7)   // P0.7
-#define  P_LORA_SCLK    (0 + 11)  // P0.11
-#define  P_LORA_MISO    (32 + 8)  // P1.8
-#define  P_LORA_MOSI    (32 + 9)  // P0.9
- 
-#define LR11X0_DIO_AS_RF_SWITCH  true
-#define LR11X0_DIO3_TCXO_VOLTAGE   1.6
-
-// built-ins
-//#define  PIN_VBAT_READ    5
-//#define  ADC_MULTIPLIER   (3 * 1.73 * 1000)
-
 class T1000eBoard : public mesh::MainBoard {
 protected:
   uint8_t startup_reason;
@@ -75,11 +59,11 @@ public:
         pinMode(GPS_RESETB, OUTPUT);
         digitalWrite(GPS_RESETB, LOW);
     #endif
-    
+
     #ifdef BUZZER_EN
         digitalWrite(BUZZER_EN, LOW);
     #endif
-    
+
     #ifdef PIN_3V3_EN
         digitalWrite(PIN_3V3_EN, LOW);
     #endif

+ 11 - 7
variants/t1000-e/platformio.ini

@@ -15,6 +15,17 @@ build_flags = ${nrf52_base.build_flags}
   -D RADIO_CLASS=CustomLR1110
   -D WRAPPER_CLASS=CustomLR1110Wrapper
   -D LORA_TX_POWER=22
+  -D RF_SWITCH_TABLE
+  -D RX_BOOSTED_GAIN=true
+  -D P_LORA_BUSY=7 ; P0.7
+  -D P_LORA_SCLK=11 ; P0.11
+  -D P_LORA_NSS=12 ; P0.12
+  -D P_LORA_DIO_1=33 ; P1.1
+  -D P_LORA_MISO=40 ; P1.8
+  -D P_LORA_MOSI=41 ; P0.9
+  -D P_LORA_RESET=42 ; P1.10
+  -D LR11X0_DIO_AS_RF_SWITCH=true
+  -D LR11X0_DIO3_TCXO_VOLTAGE=1.6
 build_src_filter = ${nrf52_base.build_src_filter}
   +<helpers/*.cpp>
   +<helpers/nrf52/T1000eBoard.cpp>
@@ -33,8 +44,6 @@ build_flags = ${t1000-e.build_flags}
   -D MAX_NEIGHBOURS=8
 ;  -D MESH_PACKET_LOGGING=1
 ;  -D MESH_DEBUG=1
-  -D RX_BOOSTED_GAIN=true
-  -D RF_SWITCH_TABLE
 build_src_filter = ${t1000-e.build_src_filter}
   +<../examples/simple_repeater>
 lib_deps = ${t1000-e.lib_deps}
@@ -51,7 +60,6 @@ build_flags = ${t1000-e.build_flags}
   -D ROOM_PASSWORD='"hello"'
 ;  -D MESH_PACKET_LOGGING=1
 ;  -D MESH_DEBUG=1
-  -D RX_BOOSTED_GAIN=true
   -D RF_SWITCH_TABLE
 build_src_filter = ${t1000-e.build_src_filter}
   +<../examples/simple_room_server>
@@ -67,8 +75,6 @@ build_flags = ${t1000-e.build_flags}
 ;  -D MESH_PACKET_LOGGING=1
 ;  -D MESH_DEBUG=1
   -D OFFLINE_QUEUE_SIZE=256
-  -D RX_BOOSTED_GAIN=true
-  -D RF_SWITCH_TABLE
   -D DISPLAY_CLASS=NullDisplayDriver
   -D PIN_BUZZER=25
   -D PIN_BUZZER_EN=37      ; P1/5 - required for T1000-E
@@ -92,8 +98,6 @@ build_flags = ${t1000-e.build_flags}
 ;  -D MESH_PACKET_LOGGING=1
 ;  -D MESH_DEBUG=1
   -D OFFLINE_QUEUE_SIZE=256
-  -D RX_BOOSTED_GAIN=true
-  -D RF_SWITCH_TABLE
   -D DISPLAY_CLASS=NullDisplayDriver
   -D PIN_BUZZER=25
   -D PIN_BUZZER_EN=37      ; P1/5 - required for T1000-E