mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
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:
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user