Add Nano Every ATmega4809 register compatibility - #116
Conversation
Keep the PR focused on Nano Every ATmega4809 board support by removing local sketch configuration from the branch. Co-authored-by: Cursor <cursoragent@cursor.com>
|
It's good that it's a version 9 release, but the BIOS patch timers still need to be addressed. Hopefully, they'll be identical to the 328. |
I am not in hurry because after soldering the wires to my PS-18 motherboard my Playstation does not run any disks even if I don't plug those wires to the Arduino controller. Once I fix the problem I will be able to test the code from the current PR, but it will not be earlier than in 2 weeks |
|
The RP version only has the LED, the serial port, and the card generation detection that are currently functional. There's no point in rushing things, and it could lead to significant changes. |
Summary
This adds explicit support for Arduino Nano Every / ATmega4809 builds that use Arduino's 328 register emulation compatibility layer.
The existing ATmega4809 implementation uses native
PORTx.DIRSET,PORTx.OUTCLR, andPORTx.INregister access. That works when compiling withRegisters emulation = None (ATMEGA4809), but fails when Arduino's compatibility mode exposesPORTBasPORTBClass, where members like.IN,.DIRSET, and.OUTCLRare not available.This change keeps the existing native ATmega4809 path untouched and adds a compatibility path using
VPORTxwhenAVR_NANO_4809_328MODEorUNO_WIFI_REV2_328MODEis defined.Why
This preserves support for current ATmega4809 raw-register builds while allowing Nano Every compatibility-mode builds to compile without
PORTBClasserrors.Verified
Registers emulation = None (ATMEGA4809)