mbv: async debugging in progres...

This commit is contained in:
2025-07-21 10:06:12 +02:00
parent f0f26af791
commit dd51b5d610
7 changed files with 78 additions and 88 deletions

View File

@@ -37,11 +37,15 @@ struct Timer {
void EnableT1() {
TCSR1.ARHT0 = 1;
TCSR1.ENIT0 = 1; // enable interrupt for overflows
TCSR1.ENT0 = 1;
}
uint32_t GetT1Ticks() { return TCR1; }
bool HasT1Overflowed() { return TCSR1.T0INT; }
void ClearT1Overflow() { TCSR1.T0INT = 1; }
void SetupAsWdt(uint32_t timeout_ticks) {
TLR0 = timeout_ticks;
TCSR0.LOAD0 = 1; // reset counter