Optiboot / optiboot

Small and Fast Bootloader for Arduino and other Atmel AVR chips
Other
1.08k stars 396 forks source link

Fix register for SOFT_UART (PINx -> PORTx) #339

Closed 2ijies11 closed 2 years ago

2ijies11 commented 2 years ago

It looks like the wrong register is selected.

WestfW commented 2 years ago

Good catch. This went in due to https://github.com/Optiboot/optiboot/issues/329 (and the previous behavior was "more wrong.") Since the power-on state of the PORT registers is 0, the current code works properly on chips where writing to PINx toggles the PORT value (ATmegaX8 in particular. But not ATmega8, ATmega32, and other older chips.)