Closed mhrdl closed 2 years ago
Thanks for reporting. 🥇
I added || defined(__AVR_ATmega4809__)
to line 314.
If you can tell me which macro is set for AVR32DB28 (like __AVR_ATmega4809__) I can add this macro to line 314 too, to support it natively. You may have to look at the verbose compile output for the macro.
Hi,
__AVR_ATmega4809__
target has issue when sending data - timer'sCCMP
is incorrectly stored/restored.irsnd_send_data
ends in an infinite loop.Problem is in following part of code: https://github.com/ukw100/IRMP/blob/9de71e836921afec918f4cb38c231dba49b18bc8/src/IRTimer.hpp#L314-L318
TCB0.CCMP
is 16-bit long, sosTimerOCR
needs to be ofuint16_t
type.storeIRTimer
/restoreIRTimer
do not correctly store / restore timer state currently. (It might be better to createsTimerCCMP
instead and use it instoreIRTimer
/restoreIRTimer
- so code is more readable ;) ).Just note: I do not use it with
__AVR_ATmega4809__
, I work with AVR32DB28 and https://github.com/SpenceKonde/DxCore - it would be very nice to have support for it ;). It seems it works with__AVR_ATmega4809__
defines correctly - except issue I mentioned here.