From 76894820d96e3b1af9a4af9b7fb6503859cd4463 Mon Sep 17 00:00:00 2001 From: Rahix Date: Wed, 29 Jul 2020 23:03:29 +0200 Subject: [PATCH] attiny85: Add patch for Timer/Counter 1 Signed-off-by: Rahix --- patch/timer/attiny85.yaml | 10 ++++++++++ patch/timer/dev/8bit-tiny.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 patch/timer/dev/8bit-tiny.yaml diff --git a/patch/timer/attiny85.yaml b/patch/timer/attiny85.yaml index 8697dd4..bc42be5 100644 --- a/patch/timer/attiny85.yaml +++ b/patch/timer/attiny85.yaml @@ -1,6 +1,16 @@ # This intermediate file is needed because peripheral-level includes are not # supported in top-level files. +_modify: + TC0: + description: "Timer/Counter0, 8-bit, PWM" + TC1: + description: "Timer/Counter1, 8-bit" + TC0: _include: - "dev/8bit.yaml" + +TC1: + _include: + - "dev/8bit-tiny.yaml" diff --git a/patch/timer/dev/8bit-tiny.yaml b/patch/timer/dev/8bit-tiny.yaml new file mode 100644 index 0000000..5ab5d73 --- /dev/null +++ b/patch/timer/dev/8bit-tiny.yaml @@ -0,0 +1,32 @@ +TCCR?,GTCCR: + COM??: + _replace_enum: + DISCONNECTED: [0, "Normal port operation, OCix disconnected"] + MATCH_TOGGLE: [1, "Toggle OCix on Compare Match"] + MATCH_CLEAR: [2, "Clear OCix on Compare Match"] + MATCH_SET: [3, "Set OCix on Compare Match"] + +TCCR?: + CS?: + _replace_enum: + NO_CLOCK: [0, "No clock source (Timer/Counter stopped)"] + DIRECT: [1, "Running, No Prescaling"] + PRESCALE_2: [2, "Running, CLK/2"] + PRESCALE_4: [3, "Running, CLK/4"] + PRESCALE_8: [4, "Running, CLK/8"] + PRESCALE_16: [5, "Running, CLK/16"] + PRESCALE_32: [6, "Running, CLK/32"] + PRESCALE_64: [7, "Running, CLK/64"] + PRESCALE_128: [8, "Running, CLK/128"] + PRESCALE_256: [9, "Running, CLK/256"] + PRESCALE_512: [10, "Running, CLK/512"] + PRESCALE_1024: [11, "Running, CLK/1024"] + PRESCALE_2048: [12, "Running, CLK/2048"] + PRESCALE_4096: [13, "Running, CLK/4096"] + PRESCALE_8192: [14, "Running, CLK/8192"] + PRESCALE_16384: [15, "Running, CLK/16384"] + +GTCCR: + _modify: + FOC??: + access: write-only -- 2.48.1