mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +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
|
||||
if p.Pin < 8 {
|
||||
*avr.PORTB &^= 1 << p.Pin
|
||||
*avr.PORTD &^= 1 << p.Pin
|
||||
} else {
|
||||
*avr.PORTB &^= 1 << (p.Pin - 8)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user