Skip to content

Commit b68c916

Browse files
committed
Activate sd spi only when sd_active
1 parent a4ff313 commit b68c916

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/DriverPins.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ class DriverPins {
320320
// setup spi
321321
bool result = true;
322322
for (auto &tmp : spi) {
323-
if (tmp.function == PinFunction::SD && sd_active)
324-
result &= tmp.begin();
323+
if (tmp.function == PinFunction::SD)
324+
if (sd_active)
325+
result &= tmp.begin();
325326
else
326327
result &= tmp.begin();
327328
}

0 commit comments

Comments
 (0)