diff options
author | luca <luca.errani1@gmail.com> | 2019-04-26 20:21:27 +0200 |
---|---|---|
committer | luca <luca.errani1@gmail.com> | 2019-04-26 20:21:27 +0200 |
commit | 4d074e8a54d5395cafbb2c860f55304b329d83ab (patch) | |
tree | 45e5b1fe8623a598d7f255e224e2840524977c14 /cores/arduino/wiring_shift.c | |
parent | 649f978224d79947d679612e4bcb326280f4f963 (diff) |
Fixed shiftOut in MSBFIRST mode HIGH/LOW
Diffstat (limited to 'cores/arduino/wiring_shift.c')
-rw-r--r-- | cores/arduino/wiring_shift.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/wiring_shift.c b/cores/arduino/wiring_shift.c index 042a95a..a9b3be5 100644 --- a/cores/arduino/wiring_shift.c +++ b/cores/arduino/wiring_shift.c @@ -46,7 +46,7 @@ void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) digitalWrite(dataPin, val & 1); val >>= 1; } else { - digitalWrite(dataPin, val & 128); + digitalWrite(dataPin, (val & 128) != 0); val <<= 1; } |