Skip to content

Commit

Permalink
Rewrite prescaler enum in ATtiny xmega SPI*.CTRLA
Browse files Browse the repository at this point in the history
  • Loading branch information
innermatrix authored and Rahix committed Jan 4, 2025
1 parent 7c7a615 commit 783e731
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patch/common/attiny-xmega/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,15 @@ PORT*:
IN:
name: INPUT

SPI*:
CTRLA:
PRESC:
_replace_enum:
CLK_PER_4_2:
[0, "Peripheral clock / 4 if CLK2X == 0 else Peripheral clock / 2"]
CLK_PER_16_8:
[1, "Peripheral clock / 16 if CLK2X == 0 else Peripheral clock / 8"]
CLK_PER_64_32:
[2, "Peripheral clock / 64 if CLK2X == 0 else Peripheral clock / 32"]
CLK_PER_128_64:
[3, "Peripheral clock / 128 if CLK2X == 0 else Peripheral clock / 64"]

0 comments on commit 783e731

Please sign in to comment.