@@ -159,12 +159,12 @@ void identifyBoard()
159
159
else if (idWithAdc (idValue, 8.2 , 3.3 , 8.5 ))
160
160
productVariant = RTK_TORCH_X2;
161
161
162
- #ifndef FLEX_OVERRIDE
162
+ #ifdef FLEX_OVERRIDE
163
163
systemPrintln (" <<<<<<<<<< !!!!!!!!!! FLEX OVERRIDE !!!!!!!!!! >>>>>>>>>>" );
164
164
productVariant = RTK_FLEX; // TODO remove once v1.1 Flex has ID resistors
165
165
#endif
166
166
167
- #ifndef TORCH_X2_OVERRIDE
167
+ #ifdef TORCH_X2_OVERRIDE
168
168
systemPrintln (" <<<<<<<<<< !!!!!!!!!! TORCH X2 OVERRIDE !!!!!!!!!! >>>>>>>>>>" );
169
169
productVariant = RTK_TORCH_X2; // TODO remove once v1.1 Torch X2 has ID resistors
170
170
#endif
@@ -824,7 +824,8 @@ void beginBoard()
824
824
pin_microSD_CS = 22 ;
825
825
pin_microSD_CardDetect = 39 ;
826
826
827
- pin_gpioExpanderInterrupt = 2 ; // TODO remove on v1.1 hardware. Not used since all GPIO expanded pins are outputs
827
+ pin_gpioExpanderInterrupt =
828
+ 2 ; // TODO remove on v1.1 hardware. Not used since all GPIO expanded pins are outputs
828
829
829
830
DMW_if systemPrintf (" pin_bluetoothStatusLED: %d\r\n " , pin_bluetoothStatusLED);
830
831
pinMode (pin_bluetoothStatusLED, OUTPUT);
@@ -882,7 +883,7 @@ void beginBoard()
882
883
pin_I2C0_SDA = 15 ;
883
884
pin_I2C0_SCL = 4 ;
884
885
885
- pin_GnssUart_RX = 14 ; // Torch X2 uses UART2 of ESP32 to communicate with LG290P
886
+ pin_GnssUart_RX = 14 ; // Torch X2 uses UART2 of ESP32 to communicate with LG290P
886
887
pin_GnssUart_TX = 17 ;
887
888
pin_GNSS_DR_Reset = 22 ; // Push low to reset GNSS/DR.
888
889
@@ -898,7 +899,7 @@ void beginBoard()
898
899
pin_beeper = 33 ;
899
900
900
901
pin_powerButton = 34 ;
901
- pin_powerSenseAndControl = 18 ; // PWRKILL
902
+ // pin_powerSenseAndControl = 18; // PWRKILL
902
903
903
904
pin_loraRadio_power = 19 ; // LoRa_EN
904
905
// pin_loraRadio_boot = 23; // LoRa_BOOT0
@@ -1205,11 +1206,11 @@ void beginGnssUart()
1205
1206
1206
1207
xTaskCreatePinnedToCore (
1207
1208
pinGnssUartTask,
1208
- " GnssUartStart" , // Just for humans
1209
- 2000 , // Stack Size
1210
- nullptr , // Task input parameter
1211
- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1212
- &taskHandle, // Task handle
1209
+ " GnssUartStart" , // Just for humans
1210
+ 2000 , // Stack Size
1211
+ nullptr , // Task input parameter
1212
+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1213
+ &taskHandle, // Task handle
1213
1214
settings.gnssUartInterruptsCore ); // Core where task should run, 0=core, 1=Arduino
1214
1215
}
1215
1216
@@ -1667,10 +1668,10 @@ void beginIdleTasks()
1667
1668
if (idleTaskHandle[index] == nullptr )
1668
1669
xTaskCreatePinnedToCore (
1669
1670
idleTask,
1670
- taskName, // Just for humans
1671
- 2000 , // Stack Size
1672
- nullptr , // Task input parameter
1673
- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1671
+ taskName, // Just for humans
1672
+ 2000 , // Stack Size
1673
+ nullptr , // Task input parameter
1674
+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1674
1675
&idleTaskHandle[index], // Task handle
1675
1676
index); // Core where task should run, 0=core, 1=Arduino
1676
1677
}
@@ -1726,11 +1727,11 @@ void beginI2C()
1726
1727
{
1727
1728
xTaskCreatePinnedToCore (
1728
1729
pinI2CTask,
1729
- " I2CStart" , // Just for humans
1730
- 2000 , // Stack Size
1731
- nullptr , // Task input parameter
1732
- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1733
- &taskHandle, // Task handle
1730
+ " I2CStart" , // Just for humans
1731
+ 2000 , // Stack Size
1732
+ nullptr , // Task input parameter
1733
+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1734
+ &taskHandle, // Task handle
1734
1735
settings.i2cInterruptsCore ); // Core where task should run, 0=core, 1=Arduino
1735
1736
1736
1737
// Wait for task to start running
@@ -1814,99 +1815,83 @@ bool i2cBusInitialization(TwoWire *i2cBus, int sda, int scl, int clockKHz)
1814
1815
1815
1816
switch (addr)
1816
1817
{
1817
- default :
1818
- {
1818
+ default : {
1819
1819
systemPrintf (" 0x%02X\r\n " , addr);
1820
1820
break ;
1821
1821
}
1822
1822
1823
- case 0x08 :
1824
- {
1823
+ case 0x08 : {
1825
1824
systemPrintf (" 0x%02X - HUSB238 Power Delivery Sink Controller\r\n " , addr);
1826
1825
break ;
1827
1826
}
1828
1827
1829
- case 0x0B :
1830
- {
1828
+ case 0x0B : {
1831
1829
systemPrintf (" 0x%02X - BQ40Z50 Battery Pack Manager / Fuel gauge\r\n " , addr);
1832
1830
break ;
1833
1831
}
1834
1832
1835
- case 0x10 :
1836
- {
1833
+ case 0x10 : {
1837
1834
systemPrintf (" 0x%02X - MFI343S00177 Authentication Coprocessor\r\n " , addr);
1838
1835
i2cAuthCoPro = i2cBus; // Record the bus
1839
1836
break ;
1840
1837
}
1841
1838
1842
- case 0x18 :
1843
- {
1839
+ case 0x18 : {
1844
1840
systemPrintf (" 0x%02X - PCA9557 GPIO Expander with Reset\r\n " , addr);
1845
1841
break ;
1846
1842
}
1847
1843
1848
- case 0x19 :
1849
- {
1844
+ case 0x19 : {
1850
1845
systemPrintf (" 0x%02X - LIS2DH12 Accelerometer\r\n " , addr);
1851
1846
break ;
1852
1847
}
1853
1848
1854
- case 0x20 :
1855
- {
1849
+ case 0x20 : {
1856
1850
systemPrintf (" 0x%02X - PCA9554 GPIO Expander with Interrupt (Postcard)\r\n " , addr);
1857
1851
break ;
1858
1852
}
1859
1853
1860
- case 0x21 :
1861
- {
1854
+ case 0x21 : {
1862
1855
systemPrintf (" 0x%02X - PCA9554 GPIO Expander with Interrupt (Flex)\r\n " , addr);
1863
1856
break ;
1864
1857
}
1865
1858
1866
- case 0x2C :
1867
- {
1859
+ case 0x2C : {
1868
1860
systemPrintf (" 0x%02X - USB251xB USB Hub\r\n " , addr);
1869
1861
break ;
1870
1862
}
1871
1863
1872
- case 0x36 :
1873
- {
1864
+ case 0x36 : {
1874
1865
systemPrintf (" 0x%02X - MAX17048 Fuel Gauge\r\n " , addr);
1875
1866
break ;
1876
1867
}
1877
1868
1878
- case 0x3C :
1879
- {
1869
+ case 0x3C : {
1880
1870
systemPrintf (" 0x%02X - SSD1306 OLED Driver (Flex)\r\n " , addr);
1881
1871
break ;
1882
1872
}
1883
1873
1884
- case 0x3D :
1885
- {
1874
+ case 0x3D : {
1886
1875
systemPrintf (" 0x%02X - SSD1306 OLED Driver (Postcard/EVK/mosaic)\r\n " , addr);
1887
1876
break ;
1888
1877
}
1889
1878
1890
- case 0x42 :
1891
- {
1879
+ case 0x42 : {
1892
1880
systemPrintf (" 0x%02X - u-blox GNSS Receiver\r\n " , addr);
1893
1881
break ;
1894
1882
}
1895
1883
1896
- case 0x43 :
1897
- {
1884
+ case 0x43 : {
1898
1885
systemPrintf (" 0x%02X - u-blox NEO-D9S Correction Data Receiver\r\n " , addr);
1899
1886
break ;
1900
1887
}
1901
1888
1902
- case 0x5C :
1903
- {
1889
+ case 0x5C : {
1904
1890
systemPrintf (" 0x%02X - MP27692A Power Management / Charger\r\n " , addr);
1905
1891
break ;
1906
1892
}
1907
1893
1908
- case 0x60 :
1909
- {
1894
+ case 0x60 : {
1910
1895
systemPrintf (" 0x%02X - ATECC608A Cryptographic Coprocessor\r\n " , addr);
1911
1896
break ;
1912
1897
}
0 commit comments