Skip to content

Commit c4f16a0

Browse files
committed
Add SDI/SDO comments
1 parent 830fdc5 commit c4f16a0

File tree

1 file changed

+67
-51
lines changed

1 file changed

+67
-51
lines changed

Firmware/RTK_Everywhere/Begin.ino

Lines changed: 67 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@ void beginBoard()
387387
pin_Cellular_RX = 14;
388388

389389
// 30, D18 : SPI SCK --> Ethernet, microSD card
390-
// 31, D19 : SPI POCI
390+
// 31, D19 : SPI POCI --> microSD card SDO
391391
// 33, D21 : I2C0 SDA --> ZED, NEO, USB2514B, TP, I/O connector
392392
pin_I2C0_SDA = 21;
393393
// 36, D22 : I2C0 SCL
394394
pin_I2C0_SCL = 22;
395-
// 37, D23 : SPI PICO
395+
// 37, D23 : SPI PICO --> microSD card SDI
396396
// 10, D25 : GNSS RX --> ZED UART1 TXO
397397
pin_GnssUart_RX = 25;
398398
// 11, D26 : LARA_PWR_ON
@@ -415,8 +415,8 @@ void beginBoard()
415415
// 5, A39 : Ethernet Interrupt
416416
pin_Ethernet_Interrupt = 39;
417417

418-
pin_PICO = 23;
419-
pin_POCI = 19;
418+
pin_PICO = 23; // SPI PICO --> microSD card SDI
419+
pin_POCI = 19; // SPI POCI --> microSD card SDO
420420
pin_SCK = 18;
421421

422422
// Disable the Ethernet controller
@@ -495,10 +495,10 @@ void beginBoard()
495495
pin_GnssUart_RX = 14;
496496
pin_microSD_CardDetect = 15;
497497
// 30, D18 : SPI SCK --> microSD card
498-
// 31, D19 : SPI POCI --> microSD card
498+
// 31, D19 : SPI POCI --> microSD card SDO
499499
pin_I2C0_SDA = 21;
500500
pin_I2C0_SCL = 22;
501-
// 37, D23 : SPI PICO --> microSD card
501+
// 37, D23 : SPI PICO --> microSD card SDI
502502
pin_microSD_CS = 25;
503503
pin_muxDAC = 26;
504504
pin_peripheralPowerControl = 27;
@@ -507,8 +507,8 @@ void beginBoard()
507507
pin_chargerLED = 34;
508508
pin_chargerLED2 = 36;
509509
pin_muxADC = 39;
510-
pin_PICO = 23;
511-
pin_POCI = 19;
510+
pin_PICO = 23; // SPI PICO --> microSD card SDI
511+
pin_POCI = 19; // SPI POCI --> microSD card SDO
512512
pin_SCK = 18;
513513

514514
pinMode(pin_muxA, OUTPUT);
@@ -574,11 +574,11 @@ void beginBoard()
574574
pin_GnssUart_TX = 13;
575575
pin_GnssUart_RX = 14;
576576
pin_microSD_CardDetect = 15;
577-
// 30, D18 : SPI SCK --> microSD card
578-
// 31, D19 : SPI POCI --> microSD card
577+
// 30, D18 : SPI SCK --> microSD card SCK
578+
// 31, D19 : SPI POCI --> microSD card SDO
579579
pin_I2C0_SDA = 21;
580580
pin_I2C0_SCL = 22;
581-
// 37, D23 : SPI PICO --> microSD card
581+
// 37, D23 : SPI PICO --> microSD card SDI
582582
pin_microSD_CS = 25;
583583
pin_muxDAC = 26;
584584
pin_peripheralPowerControl = 27;
@@ -587,8 +587,8 @@ void beginBoard()
587587
pin_chargerLED = 34;
588588
pin_chargerLED2 = 36;
589589
pin_muxADC = 39;
590-
pin_PICO = 23;
591-
pin_POCI = 19;
590+
pin_PICO = 23; // SPI PICO --> microSD card SDI
591+
pin_POCI = 19; // SPI POCI --> microSD card SDO
592592
pin_SCK = 18;
593593

594594
pinMode(pin_muxA, OUTPUT);
@@ -744,9 +744,9 @@ void beginBoard()
744744
pin_GNSS_Reset = 33;
745745
pin_GNSS_TimePulse = 36; // PPS on LG290P
746746

747+
pin_PICO = 26; // SPI PICO --> microSD card SDI
748+
pin_POCI = 25; // SPI POCI --> microSD card SDO
747749
pin_SCK = 32;
748-
pin_POCI = 25;
749-
pin_PICO = 26;
750750
pin_microSD_CS = 27;
751751

752752
pin_gpioExpanderInterrupt = 14; // Pin 'AOI' (Analog Output Input) on Portability Shield
@@ -785,7 +785,7 @@ void beginBoard()
785785
// TODO Change to MFi present.encryption_atecc608a = true;
786786

787787
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
788+
// present.button_mode = true; //TODO remove comment. This won't be available until v1.1 of hardware
789789
present.beeper = true;
790790
present.gnss_to_uart = true;
791791
present.needsExternalPpl = true; // Uses the PointPerfect Library
@@ -811,7 +811,7 @@ void beginBoard()
811811
pin_GnssUart_TX = 27;
812812

813813
pin_powerSenseAndControl = 34;
814-
//pin_modeButton = 25; //TODO remove comment. This won't be available until v1.1 of hardware
814+
// pin_modeButton = 25; //TODO remove comment. This won't be available until v1.1 of hardware
815815

816816
pin_IMU_RX = 14; // ESP32 UART2
817817
pin_IMU_TX = 17;
@@ -823,13 +823,13 @@ void beginBoard()
823823

824824
pin_beeper = 33;
825825

826+
pin_PICO = 21; // SPI PICO --> microSD card SDI
827+
pin_POCI = 19; // SPI POCI --> microSD card SDO
828+
pin_SCK = 18; // SPI SCK --> microSD card SCK
826829
pin_microSD_CS = 22;
827830
pin_microSD_CardDetect = 39;
828-
// D18 : SPI SCK --> microSD card
829-
// D19 : SPI POCI --> microSD card
830-
// D21 : SPI PICO --> microSD card
831831

832-
pin_gpioExpanderInterrupt = 2; // Not used since all GPIO expanded pins are outputs
832+
pin_gpioExpanderInterrupt = 2; // TODO remove on v1.1 hardware. Not used since all GPIO expanded pins are outputs
833833

834834
DMW_if systemPrintf("pin_bluetoothStatusLED: %d\r\n", pin_bluetoothStatusLED);
835835
pinMode(pin_bluetoothStatusLED, OUTPUT);
@@ -1124,11 +1124,11 @@ void beginGnssUart()
11241124

11251125
xTaskCreatePinnedToCore(
11261126
pinGnssUartTask,
1127-
"GnssUartStart", // Just for humans
1128-
2000, // Stack Size
1129-
nullptr, // Task input parameter
1130-
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1131-
&taskHandle, // Task handle
1127+
"GnssUartStart", // Just for humans
1128+
2000, // Stack Size
1129+
nullptr, // Task input parameter
1130+
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1131+
&taskHandle, // Task handle
11321132
settings.gnssUartInterruptsCore); // Core where task should run, 0=core, 1=Arduino
11331133
}
11341134

@@ -1570,10 +1570,10 @@ void beginIdleTasks()
15701570
if (idleTaskHandle[index] == nullptr)
15711571
xTaskCreatePinnedToCore(
15721572
idleTask,
1573-
taskName, // Just for humans
1574-
2000, // Stack Size
1575-
nullptr, // Task input parameter
1576-
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1573+
taskName, // Just for humans
1574+
2000, // Stack Size
1575+
nullptr, // Task input parameter
1576+
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
15771577
&idleTaskHandle[index], // Task handle
15781578
index); // Core where task should run, 0=core, 1=Arduino
15791579
}
@@ -1629,11 +1629,11 @@ void beginI2C()
16291629
{
16301630
xTaskCreatePinnedToCore(
16311631
pinI2CTask,
1632-
"I2CStart", // Just for humans
1633-
2000, // Stack Size
1634-
nullptr, // Task input parameter
1635-
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1636-
&taskHandle, // Task handle
1632+
"I2CStart", // Just for humans
1633+
2000, // Stack Size
1634+
nullptr, // Task input parameter
1635+
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1636+
&taskHandle, // Task handle
16371637
settings.i2cInterruptsCore); // Core where task should run, 0=core, 1=Arduino
16381638

16391639
// Wait for task to start running
@@ -1717,82 +1717,98 @@ bool i2cBusInitialization(TwoWire *i2cBus, int sda, int scl, int clockKHz)
17171717

17181718
switch (addr)
17191719
{
1720-
default: {
1720+
default:
1721+
{
17211722
systemPrintf(" 0x%02X\r\n", addr);
17221723
break;
17231724
}
17241725

1725-
case 0x08: {
1726+
case 0x08:
1727+
{
17261728
systemPrintf(" 0x%02X - HUSB238 Power Delivery Sink Controller\r\n", addr);
17271729
break;
17281730
}
17291731

1730-
case 0x0B: {
1732+
case 0x0B:
1733+
{
17311734
systemPrintf(" 0x%02X - BQ40Z50 Battery Pack Manager / Fuel gauge\r\n", addr);
17321735
break;
17331736
}
17341737

1735-
case 0x10: {
1738+
case 0x10:
1739+
{
17361740
systemPrintf(" 0x%02X - MFi Authentication Coprocessor\r\n", addr);
17371741
break;
17381742
}
17391743

1740-
case 0x18: {
1744+
case 0x18:
1745+
{
17411746
systemPrintf(" 0x%02X - PCA9557 GPIO Expander with Reset\r\n", addr);
17421747
break;
17431748
}
17441749

1745-
case 0x19: {
1750+
case 0x19:
1751+
{
17461752
systemPrintf(" 0x%02X - LIS2DH12 Accelerometer\r\n", addr);
17471753
break;
17481754
}
17491755

1750-
case 0x20: {
1756+
case 0x20:
1757+
{
17511758
systemPrintf(" 0x%02X - PCA9554 GPIO Expander with Interrupt (Postcard)\r\n", addr);
17521759
break;
17531760
}
17541761

1755-
case 0x21: {
1762+
case 0x21:
1763+
{
17561764
systemPrintf(" 0x%02X - PCA9554 GPIO Expander with Interrupt (Flex)\r\n", addr);
17571765
break;
17581766
}
17591767

1760-
case 0x2C: {
1768+
case 0x2C:
1769+
{
17611770
systemPrintf(" 0x%02X - USB251xB USB Hub\r\n", addr);
17621771
break;
17631772
}
17641773

1765-
case 0x36: {
1774+
case 0x36:
1775+
{
17661776
systemPrintf(" 0x%02X - MAX17048 Fuel Gauge\r\n", addr);
17671777
break;
17681778
}
17691779

1770-
case 0x3C: {
1780+
case 0x3C:
1781+
{
17711782
systemPrintf(" 0x%02X - SSD1306 OLED Driver (Flex)\r\n", addr);
17721783
break;
17731784
}
17741785

1775-
case 0x3D: {
1786+
case 0x3D:
1787+
{
17761788
systemPrintf(" 0x%02X - SSD1306 OLED Driver (Postcard/EVK/mosaic)\r\n", addr);
17771789
break;
17781790
}
17791791

1780-
case 0x42: {
1792+
case 0x42:
1793+
{
17811794
systemPrintf(" 0x%02X - u-blox GNSS Receiver\r\n", addr);
17821795
break;
17831796
}
17841797

1785-
case 0x43: {
1798+
case 0x43:
1799+
{
17861800
systemPrintf(" 0x%02X - u-blox NEO-D9S Correction Data Receiver\r\n", addr);
17871801
break;
17881802
}
17891803

1790-
case 0x5C: {
1804+
case 0x5C:
1805+
{
17911806
systemPrintf(" 0x%02X - MP27692A Power Management / Charger\r\n", addr);
17921807
break;
17931808
}
17941809

1795-
case 0x60: {
1810+
case 0x60:
1811+
{
17961812
systemPrintf(" 0x%02X - ATECC608A Cryptographic Coprocessor\r\n", addr);
17971813
break;
17981814
}

0 commit comments

Comments
 (0)