Open atehxx opened 6 years ago
Hi thanks for your contribution. I am momentarily away with reduced access. I will look at your PR and integrate it next week (after testing that it does not break existing code). M
No problem. I tested this on Arduino Mega, on Uno, and on Atmega644PA standalone chip (with arduino core added). Also there was your comment "TODO try a cleanup with a consexpr function, i.e. a function that is evaluated at compile time." this doesn't seem to be needed - I was checking compiled code and it already evaluates and compiles to final registry. uint16_t here is needed as some ports on Mega have 2 byte address, but it's enough to change it here only - I spent 2 days taking my hairs off why this library doesn't work... I was using port H :D
Added more ports (now matches also ArduinoMega) Changed TRx_PORT and DDR type to uint16_t to allow all ports of Arduino Mega (e.g. PORTH)