Interrupt based time. Adjust tick cost when timer-0 is reconfigured (the time precision affected when timer-0 reconfigured). Keep all time in nanoseconds.

Interrupt based time. Adjust tick cost every 1 minute and when timer-0 is reconfigured (the time precision affected when timer-0 reconfigured). Keep all time in nanoseconds.
This commit is contained in:
Dmitriy
2021-12-23 22:05:21 -05:00
committed by Ron Evans
parent d0633f6228
commit 92150bd1c5
5 changed files with 141 additions and 17 deletions
+16
View File
@@ -0,0 +1,16 @@
//go:build avr && attiny85
// +build avr,attiny85
package avr
// The attiny85 have only TIMSK when other AVR boards have TIMSK0 and TIMSK1, etc.
// Create an alias of TIMSK, TIMSK_OCIE0A, TIMSK_OCIE0B and TIMSK_TOIE0 so we can use
// common code to mask interrupts.
var TIMSK0 = TIMSK
const (
TIMSK0_OCIE0A = TIMSK_OCIE0A
TIMSK0_OCIE0B = TIMSK_OCIE0B
TIMSK0_TOIE0 = TIMSK_TOIE0
)