I know this issue stems from the original Caterina bootloader but this is the bootloader I'm using so I'm asking here. My application needs to see what caused a reset in order to properly interact with the USB host, but on line 146 of AnyKey.c, the MCUSR register is immediately reset to 0 after it's read. This renders it impossible to read the reset condition in the application. Can you move that line down to say line 163 or just remove it entirely (if possible) so people can read that register?
I know this issue stems from the original Caterina bootloader but this is the bootloader I'm using so I'm asking here. My application needs to see what caused a reset in order to properly interact with the USB host, but on line 146 of AnyKey.c, the MCUSR register is immediately reset to 0 after it's read. This renders it impossible to read the reset condition in the application. Can you move that line down to say line 163 or just remove it entirely (if possible) so people can read that register?