avr: correct register for Set() operation on pins 0-7

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2018-09-13 10:42:08 +02:00
committed by Ayke
parent 76e77917d8
commit d948abdf82
+1 -1
View File
@@ -41,7 +41,7 @@ func (p GPIO) Set(value bool) {
}
} else { // clear bits
if p.Pin < 8 {
*avr.PORTB &^= 1 << p.Pin
*avr.PORTD &^= 1 << p.Pin
} else {
*avr.PORTB &^= 1 << (p.Pin - 8)
}