Skip to content

Commit 82c1726

Browse files
committed
digitalRead typo
1 parent 8df2002 commit 82c1726

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

avr/cores/picocore/wiring.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,15 @@ uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, _bitOrder bitOrder)
2121
{ // do
2222
// use inline asm to access the carry bit (not part of C/C++)
2323
morebits:
24-
//PORTB |= 1 << clockPin;
2524
digitalWrite(clockPin, HIGH);
2625
if (bitOrder == MSBFIRST) value <<= 1;
2726
else value >>= 1;
2827

29-
//if (bit_is_set(PORTB, dataPin))
30-
if (digialRead(dataPin))
28+
if (digitalRead(dataPin))
3129
{
3230
if (bitOrder == MSBFIRST) value |= 0x01;
3331
else value |= 0x80;
3432
}
35-
//PORTB &= ~(1 << clockPin);
3633
digitalWrite(clockPin, LOW);
3734

3835
asm goto ("brcc %l[morebits]" :::: morebits);

0 commit comments

Comments
 (0)