1
0
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:
Peter Van Hoyweghen 2015-08-30 20:36:39 +02:00
parent e3866e0ef5
commit 2c1728f086

View File

@ -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);