mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Use digitalWrite() only with values HIGH and LOW.
This commit is contained in:
parent
e3866e0ef5
commit
2c1728f086
@ -181,7 +181,7 @@ public:
|
||||
|
||||
uint8_t transfer (uint8_t b) {
|
||||
for (unsigned int i = 0; i < 8; ++i) {
|
||||
digitalWrite(MOSI, b & 0x80);
|
||||
digitalWrite(MOSI, (b & 0x80) ? HIGH : LOW);
|
||||
digitalWrite(SCK, HIGH);
|
||||
delayMicroseconds(pulseWidth);
|
||||
b = (b << 1) | digitalRead(MISO);
|
||||
|
Loading…
x
Reference in New Issue
Block a user