Skip to content

Commit 7f6dbe1

Browse files
dalpilRahix
authored andcommitted
Adds patch for the timers on attiny167
1 parent ed20a8b commit 7f6dbe1

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

patch/attiny167.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ _include:
77
# - "common/twi.yaml"
88
- "common/wdt.yaml"
99
- "common/tiny/usi.yaml"
10-
11-
12-
# - "timer/attiny88.yaml"
10+
- "timer/attiny167.yaml"
1311

1412
ADC:
1513
ADMUX:

patch/timer/attiny167.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This intermediate file is needed because peripheral-level includes are not
2+
# supported in top-level files.
3+
4+
_modify:
5+
TC1:
6+
description: "Timer/Counter1, 16-bit, PWM"
7+
8+
TC0:
9+
_include:
10+
- "dev/8bit-tiny167.yaml"
11+
12+
TC1:
13+
_include:
14+
- "dev/16bit.yaml"

patch/timer/dev/8bit-tiny167.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
TCCR?B:
2+
_modify:
3+
CS?:
4+
_write_constraint: enum
5+
6+
CS?:
7+
_replace_enum:
8+
NO_CLOCK: [0, "No clock source (Timer/Counter stopped)"]
9+
DIRECT: [1, "Running, No Prescaling"]
10+
PRESCALE_8: [2, "Running, CLK/8"]
11+
PRESCALE_32: [3, "Running, CLK/32"]
12+
PRESCALE_64: [4, "Running, CLK/64"]
13+
PRESCALE_128: [5, "Running, CLK/128"]
14+
PRESCALE_256: [6, "Running, CLK/256"]
15+
PRESCALE_1024: [7, "Running, CLK/1024"]

0 commit comments

Comments
 (0)