platformio / platform-atmelmegaavr

Atmel megaAVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelmegaavr
Apache License 2.0
28 stars 21 forks source link

UPDI pin mode or MVIO mode fuses for AVR-DD #62

Open tactical-snacks opened 1 year ago

tactical-snacks commented 1 year ago

for AVR-DD's ...

may help closing issues #60

MCUdude commented 10 months ago

The PR looks mostly good, but it would make it impossible to use PlatformIO to turn the UPDI pin into a GPIO pin.

You should probably do something like this instead (untested):

        if ("dd" in board.get("build.mcu").lower()):
             if pin == "updi":
                 updipin_bit = 1
             elif pin == "gpio":
                 updipin_bit = 0
         else:
             updipin_bit = 0            
         return 0xC0 | updipin_bit << 4 | rstpin_bit << 3 | eesave_bit
tactical-snacks commented 9 months ago

how/where could i add board_hardware.updipin for the avr-dd since it has multipurpose reset and updi pins?

tactical-snacks commented 2 months ago

should i close this?