mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 21:51:46 +00:00
Track actual GPIO values, not just the enum values (#3768)
* Track actual GPIO values, not just the enum values * trunk
This commit is contained in:
parent
71400103b3
commit
06e7d2b845
@ -75,7 +75,7 @@ void portduinoSetup()
|
|||||||
{
|
{
|
||||||
printf("Setting up Meshtastic on Portduino...\n");
|
printf("Setting up Meshtastic on Portduino...\n");
|
||||||
int max_GPIO = 0;
|
int max_GPIO = 0;
|
||||||
int GPIO_lines[] = {cs,
|
configNames GPIO_lines[] = {cs,
|
||||||
irq,
|
irq,
|
||||||
busy,
|
busy,
|
||||||
reset,
|
reset,
|
||||||
@ -281,9 +281,9 @@ void portduinoSetup()
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i : GPIO_lines) {
|
for (configNames i : GPIO_lines) {
|
||||||
if (i > max_GPIO)
|
if (settingsMap[i] > max_GPIO)
|
||||||
max_GPIO = i;
|
max_GPIO = settingsMap[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
gpioInit(max_GPIO + 1); // Done here so we can inform Portduino how many GPIOs we need.
|
gpioInit(max_GPIO + 1); // Done here so we can inform Portduino how many GPIOs we need.
|
||||||
|
Loading…
Reference in New Issue
Block a user