File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -339,6 +339,15 @@ static peripheral_descriptor_t const *get_active_peripheral(void)
339339 {
340340 milliseconds = BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT ;
341341 }
342+
343+ if (IS_WORMHOLE_OPEN ) {
344+ milliseconds = Wormhole .timeoutMs ;
345+ }
346+
347+ if (milliseconds < BL_MIN_PERIPHERAL_DETECT_TIMEOUT ) {
348+ milliseconds = BL_MIN_PERIPHERAL_DETECT_TIMEOUT ;
349+ }
350+
342351 timeoutTicks = milliseconds * ticksPerMillisecond ;
343352
344353 // save how many ticks we're currently at before the detection loop starts
Original file line number Diff line number Diff line change 2222 typedef struct {
2323 uint64_t magicNumber ;
2424 uint8_t enumerationMode ;
25- uint16_t timeoutMs ;
25+ uint32_t timeoutMs ;
2626 } wormhole_t ;
2727
2828// Variables:
Original file line number Diff line number Diff line change 8484#define BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT 0
8585#else
8686#define BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT 5000
87+ #define BL_MIN_PERIPHERAL_DETECT_TIMEOUT 1000
8788#endif // DEBUG
8889
8990#define BL_FEATURE_POWERDOWN (0)
You can’t perform that action at this time.
0 commit comments