From 5b8f3bc13ab59a98caa9a25490b40a337f13af86 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 11 May 2019 22:33:28 +0200 Subject: [PATCH] atmega32u4, attiny85: Add more patches Signed-off-by: Rahix --- patch/atmega32u4.yaml | 3 +++ patch/attiny85.yaml | 11 ++++++++++- patch/common/ac.yaml | 13 +++++++++++-- patch/common/ac/acsr.yaml | 11 ----------- patch/common/twi.yaml | 22 ++++++++++++++++++++++ 5 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 patch/atmega32u4.yaml delete mode 100644 patch/common/ac/acsr.yaml create mode 100644 patch/common/twi.yaml diff --git a/patch/atmega32u4.yaml b/patch/atmega32u4.yaml new file mode 100644 index 0000000..78bc50c --- /dev/null +++ b/patch/atmega32u4.yaml @@ -0,0 +1,3 @@ +_include: + - "common/ac.yaml" + - "common/twi.yaml" diff --git a/patch/attiny85.yaml b/patch/attiny85.yaml index 9632e98..010fb59 100644 --- a/patch/attiny85.yaml +++ b/patch/attiny85.yaml @@ -1,2 +1,11 @@ _include: - - "common/ac.yaml" + - "common/ac.yaml" + +USI: + USICR: + USIWM: + _replace_enum: + DISABLED: [0, "All detectors disabled. Port pins operates as normal."] + THREE_WIRE: [1, "Three-wire mode. Uses DO, DI, and USCK pins."] + TWO_WIRE_SLAVE: [2, "Two-wire mode (Slave). Uses SDA (DI) and SCL (USCK) pins."] + TWO_WIRE_MASTER: [3, "Two-wire mode (Master). Uses SDA and SCL pins."] diff --git a/patch/common/ac.yaml b/patch/common/ac.yaml index c39cf7c..87ef63c 100644 --- a/patch/common/ac.yaml +++ b/patch/common/ac.yaml @@ -1,2 +1,11 @@ -_include: - - "ac/acsr.yaml" +AC: + ACSR: + _modify: + ACIS: + description: "Analog Comparator Interrupt Mode Select" + ACIS: + _replace_enum: + ON_TOGGLE: [0, "Interrupt on Toggle"] + # Leaving [1, 'Reserved'] out + ON_FALLING_EDGE: [2, "Interrupt on Falling Edge"] + ON_RISING_EDGE: [3, "Interrupt on Rising Edge"] diff --git a/patch/common/ac/acsr.yaml b/patch/common/ac/acsr.yaml deleted file mode 100644 index 0531e03..0000000 --- a/patch/common/ac/acsr.yaml +++ /dev/null @@ -1,11 +0,0 @@ -AC: - ACSR: - _modify: - ACIS: - description: "Analog Comparator Interrupt Mode Select" - ACIS: - _replace_enum: - ON_TOGGLE: [0, "Interrupt on Toggle"] - # Leaving [1, 'Reserved'] out - ON_FALLING_EDGE: [2, "Interrupt on Falling Edge"] - ON_RISING_EDGE: [3, "Interrupt on Rising Edge"] diff --git a/patch/common/twi.yaml b/patch/common/twi.yaml new file mode 100644 index 0000000..c331094 --- /dev/null +++ b/patch/common/twi.yaml @@ -0,0 +1,22 @@ +TWI: + _modify: + TWCR: + access: read-write + TWCR: + _modify: + TWWC: + access: read-only + TWAMR: + _modify: + TWAM: + description: "TWI (Slave) Address Mask Bits" + TWSR: + _modify: + TWS: + access: read-only + TWPS: + _replace_enum: + PRESCALER_1: [0, "Prescaler Value 1"] + PRESCALER_4: [1, "Prescaler Value 4"] + PRESCALER_16: [2, "Prescaler Value 16"] + PRESCALER_64: [3, "Prescaler Value 64"] -- 2.49.0