Skip to content

Commit 3a0bc16

Browse files
authored
Merge pull request #15 from ajowsey/fix_reset
Fix reset to use system definition of digital write
2 parents b378045 + 0fa782c commit 3a0bc16

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SparkFunSX1509.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ void SX1509::reset(bool hardware)
9393
writeByte(REG_MISC, regMisc);
9494
}
9595
// Reset the SX1509, the pin is active low
96-
pinMode(pinReset, OUTPUT); // set reset pin as output
97-
digitalWrite(pinReset, LOW); // pull reset pin low
96+
::pinMode(pinReset, OUTPUT); // set reset pin as output
97+
::digitalWrite(pinReset, LOW); // pull reset pin low
9898
delay(1); // Wait for the pin to settle
99-
digitalWrite(pinReset, HIGH); // pull reset pin back high
99+
::digitalWrite(pinReset, HIGH); // pull reset pin back high
100100
}
101101
else
102102
{
@@ -506,10 +506,10 @@ void SX1509::sync(void)
506506
}
507507

508508
// Toggle nReset pin to sync LED timers
509-
pinMode(pinReset, OUTPUT); // set reset pin as output
510-
digitalWrite(pinReset, LOW); // pull reset pin low
509+
::pinMode(pinReset, OUTPUT); // set reset pin as output
510+
::digitalWrite(pinReset, LOW); // pull reset pin low
511511
delay(1); // Wait for the pin to settle
512-
digitalWrite(pinReset, HIGH); // pull reset pin back high
512+
::digitalWrite(pinReset, HIGH); // pull reset pin back high
513513

514514
// Return nReset to POR functionality
515515
writeByte(REG_MISC, (regMisc & ~(1 << 2)));

0 commit comments

Comments
 (0)