diff --git a/devices/common_patches/l4_lcd_segment.yaml b/devices/common_patches/l4_lcd_segment.yaml new file mode 100644 index 000000000..c51a5e0ab --- /dev/null +++ b/devices/common_patches/l4_lcd_segment.yaml @@ -0,0 +1,15 @@ +# LCD RAM_COM registers are 64 bit wide, not 32. +LCD: + _modify: + RAM_COM?: + size: 0x40 + RAM_COM?: + _delete: + - "S??" + _add: + SEGS: + description: "Segment states, one bit per segment, LSB: S00, MSB: S39" + bitOffset: 0 + bitWidth: 40 + _array: + "RAM_COM?": {} diff --git a/devices/stm32l4x3.yaml b/devices/stm32l4x3.yaml index bdf0edc0a..843b96bc9 100644 --- a/devices/stm32l4x3.yaml +++ b/devices/stm32l4x3.yaml @@ -157,3 +157,4 @@ _include: - ./common_patches/l4_adc_sqr1.yaml - ./common_patches/l4_spi.yaml - ../peripherals/spi/spi_l4.yaml + - ./common_patches/l4_lcd_segment.yaml diff --git a/devices/stm32l4x6.yaml b/devices/stm32l4x6.yaml index fc88f5ea3..7ff3b90ff 100644 --- a/devices/stm32l4x6.yaml +++ b/devices/stm32l4x6.yaml @@ -76,3 +76,4 @@ _include: - ../peripherals/dma/dma2d_v1.yaml - ./common_patches/l4_spi.yaml - ../peripherals/spi/spi_l4.yaml + - ./common_patches/l4_lcd_segment.yaml