Skip to content

Commit 9b447f5

Browse files
committed
PIN_PWR_DELAY_MS --> PERIPHERAL_WARMUP_MS
It turns out we had two methods for delaying startup while peripherals warmed up. They were invented within months of each other and just missed the chance to merge. Let's delete PIN_PWR_DELAY_MS and use PERIPHERAL_WARMUP_MS, since it's most common and earlier in the sequence.
1 parent 13c4c20 commit 9b447f5

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/main.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,11 +1163,6 @@ void setup()
11631163
#endif
11641164
#endif
11651165

1166-
#ifdef PIN_PWR_DELAY_MS
1167-
// This may be required to give the peripherals time to power up.
1168-
delay(PIN_PWR_DELAY_MS);
1169-
#endif
1170-
11711166
#ifdef ARCH_PORTDUINO
11721167
// as one can't use a function pointer to the class constructor:
11731168
auto loraModuleInterface = [](LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,

variants/nrf52840/canaryone/variant.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static const uint8_t A0 = PIN_A0;
103103
#define EXTERNAL_FLASH_USE_QSPI
104104

105105
// Add a delay on startup to allow LoRa and GPS to power up
106-
#define PIN_PWR_DELAY_MS 100
106+
#define PERIPHERAL_WARMUP_MS 100
107107

108108
/*
109109
* Lora radio
@@ -178,4 +178,4 @@ static const uint8_t A0 = PIN_A0;
178178
* Arduino objects - C++ only
179179
*----------------------------------------------------------------------------*/
180180

181-
#endif
181+
#endif

0 commit comments

Comments
 (0)