~ruther/avr-device

76894820d96e3b1af9a4af9b7fb6503859cd4463 — Rahix 4 years ago 575b441
attiny85: Add patch for Timer/Counter 1

Signed-off-by: Rahix <rahix@rahix.de>
2 files changed, 42 insertions(+), 0 deletions(-)

M patch/timer/attiny85.yaml
A patch/timer/dev/8bit-tiny.yaml
M patch/timer/attiny85.yaml => patch/timer/attiny85.yaml +10 -0
@@ 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"

A patch/timer/dev/8bit-tiny.yaml => patch/timer/dev/8bit-tiny.yaml +32 -0
@@ 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

Do not follow this link