mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
move AVR interrupt related code to runtime
move AVR interrupt related code to runtime address formatting add volatile to access counters
This commit is contained in:
committed by
Ron Evans
parent
7914a729a5
commit
50401c05e8
@@ -71,7 +71,7 @@ func (pwm PWM) Configure(config PWMConfig) error {
|
||||
avr.TCCR0A.Set(avr.TCCR0A_WGM00 | avr.TCCR0A_WGM01)
|
||||
// monotonic timer is using the same time as PWM:0
|
||||
// we must adust internal settings of monotonic timer when PWM:0 settings changed
|
||||
AdjustMonotonicTimer()
|
||||
adjustMonotonicTimer()
|
||||
} else {
|
||||
avr.TCCR2B.Set(prescaler)
|
||||
// Set the PWM mode to fast PWM (mode = 3).
|
||||
@@ -400,7 +400,7 @@ func (pwm PWM) Set(channel uint8, value uint32) {
|
||||
}
|
||||
// monotonic timer is using the same time as PWM:0
|
||||
// we must adust internal settings of monotonic timer when PWM:0 settings changed
|
||||
AdjustMonotonicTimer()
|
||||
adjustMonotonicTimer()
|
||||
case 1:
|
||||
mask := interrupt.Disable()
|
||||
switch channel {
|
||||
|
||||
Reference in New Issue
Block a user