mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
avr: correct register for Set() operation on pins 0-7
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
@@ -41,7 +41,7 @@ func (p GPIO) Set(value bool) {
|
|||||||
}
|
}
|
||||||
} else { // clear bits
|
} else { // clear bits
|
||||||
if p.Pin < 8 {
|
if p.Pin < 8 {
|
||||||
*avr.PORTB &^= 1 << p.Pin
|
*avr.PORTD &^= 1 << p.Pin
|
||||||
} else {
|
} else {
|
||||||
*avr.PORTB &^= 1 << (p.Pin - 8)
|
*avr.PORTB &^= 1 << (p.Pin - 8)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user