@@ -772,13 +772,6 @@ void beginBoard()
772
772
773
773
else if (productVariant == RTK_FLEX)
774
774
{
775
- // #ifdef COMPILE_LG290P
776
- // gnss = (GNSS *)new GNSS_LG290P();
777
- // #else // COMPILE_LGP290P
778
- // gnss = (GNSS *)new GNSS_None();
779
- // systemPrintln("<<<<<<<<<< !!!!!!!!!! LG290P NOT COMPILED !!!!!!!!!! >>>>>>>>>>");
780
- // #endif // COMPILE_LGP290P
781
-
782
775
present.brand = BRAND_SPARKPNT;
783
776
present.psram_2mb = true ;
784
777
@@ -791,7 +784,8 @@ void beginBoard()
791
784
792
785
// TODO Change to MFi present.encryption_atecc608a = true;
793
786
794
- present.button_powerHigh = true ; // Button is pressed when high
787
+ present.button_powerLow = true ; // Button is pressed when high
788
+ // present.button_mode = true; //TODO remove comment. This won't be available until v1.1 of hardware
795
789
present.beeper = true ;
796
790
present.gnss_to_uart = true ;
797
791
present.needsExternalPpl = true ; // Uses the PointPerfect Library
@@ -802,9 +796,10 @@ void beginBoard()
802
796
present.dynamicModel = true ;
803
797
804
798
present.gpioExpanderSwitches = true ;
799
+ present.microSd = true ;
805
800
806
801
present.display_i2c0 = true ;
807
- // present.i2c0BusSpeed_400 = true; // Run display bus at higher speed
802
+ // present.i2c0BusSpeed_400 = true; // Run display bus at higher speed
808
803
present.display_type = DISPLAY_128x64_INVERTED;
809
804
present.tiltPossible = true ;
810
805
@@ -814,7 +809,8 @@ void beginBoard()
814
809
pin_GnssUart_RX = 26 ;
815
810
pin_GnssUart_TX = 27 ;
816
811
817
- pin_powerButton = 34 ;
812
+ pin_powerSenseAndControl = 34 ;
813
+ // pin_modeButton = 25; //TODO remove comment. This won't be available until v1.1 of hardware
818
814
819
815
pin_IMU_RX = 14 ; // ESP32 UART2
820
816
pin_IMU_TX = 17 ;
@@ -826,6 +822,12 @@ void beginBoard()
826
822
827
823
pin_beeper = 33 ;
828
824
825
+ pin_microSD_CS = 22 ;
826
+ pin_microSD_CardDetect = 39 ;
827
+ // D18 : SPI SCK --> microSD card
828
+ // D19 : SPI POCI --> microSD card
829
+ // D21 : SPI PICO --> microSD card
830
+
829
831
pin_gpioExpanderInterrupt = 2 ; // Not used since all GPIO expanded pins are outputs
830
832
831
833
DMW_if systemPrintf (" pin_bluetoothStatusLED: %d\r\n " , pin_bluetoothStatusLED);
@@ -834,14 +836,20 @@ void beginBoard()
834
836
DMW_if systemPrintf (" pin_gnssStatusLED: %d\r\n " , pin_gnssStatusLED);
835
837
pinMode (pin_gnssStatusLED, OUTPUT);
836
838
839
+ pinMode (pin_microSD_CardDetect, INPUT_PULLUP);
840
+
841
+ // Disable the microSD card
842
+ pinMode (pin_microSD_CS, OUTPUT);
843
+ sdDeselectCard ();
844
+
837
845
// Turn on Bluetooth, GNSS, and Battery LEDs to indicate power on
838
846
bluetoothLedOn ();
839
847
gnssStatusLedOn ();
840
848
841
849
pinMode (pin_beeper, OUTPUT);
842
850
beepOff ();
843
851
844
- pinMode (pin_powerButton , INPUT);
852
+ pinMode (pin_powerSenseAndControl , INPUT);
845
853
846
854
pinMode (pin_powerAdapterDetect, INPUT); // Has 10k pullup
847
855
@@ -1161,10 +1169,8 @@ void pinGnssUartTask(void *pvParameters)
1161
1169
}
1162
1170
else if (productVariant == RTK_FLEX)
1163
1171
{
1164
- Serial.println (" Starting UART for flex" );
1165
1172
if (settings.detectedGnssReceiver == GNSS_RECEIVER_LG290P)
1166
1173
{
1167
- Serial.println (" Starting UART for LG290P" );
1168
1174
// LG290P communicates at 460800bps.
1169
1175
platformGnssCommunicationRate = 115200 * 4 ;
1170
1176
}
@@ -1447,7 +1453,7 @@ void beginButtons()
1447
1453
userBtn = new Button (pin_powerButton, 25 , true ,
1448
1454
false ); // Turn off inversion. Needed for buttons that are high when pressed.
1449
1455
1450
- // EVK mode button
1456
+ // EVK/Flex user button (Mode or Fn)
1451
1457
if (present.button_mode == true )
1452
1458
userBtn = new Button (pin_modeButton);
1453
1459
0 commit comments