From 0e62b15125c46b63913dd240d8cccefe510034d1 Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 4 Apr 2012 19:59:45 +0200 Subject: added lcd example the way text is generated is currently rather awkward, looking for a better solution. --- include/libopencm3/efm32/tinygecko/lcd.h | 32 +++++++++++++++-------------- include/libopencm3/efm32/tinygecko/lcd.yaml | 5 ++++- 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'include/libopencm3/efm32') diff --git a/include/libopencm3/efm32/tinygecko/lcd.h b/include/libopencm3/efm32/tinygecko/lcd.h index 29f4b43..d46ef24 100644 --- a/include/libopencm3/efm32/tinygecko/lcd.h +++ b/include/libopencm3/efm32/tinygecko/lcd.h @@ -65,7 +65,7 @@ #define LCD_SEGD2L MMIO32(LCD_BASE + 0x048) /**< @see EFM32TG_LCD_SEG_bits */ #define LCD_SEGD3L MMIO32(LCD_BASE + 0x04c) /**< @see EFM32TG_LCD_SEG_bits */ #define LCD_FREEZE MMIO32(LCD_BASE + 0x060) /**< @see EFM32TG_LCD_FREEZE_bits */ -#define LCD_SYNGBUSY MMIO32(LCD_BASE + 0x064) /**< @see EFM32TG_LCD_SYNGBUSY_bits */ +#define LCD_SYNCBUSY MMIO32(LCD_BASE + 0x064) /**< @see EFM32TG_LCD_SYNCBUSY_bits */ #define LCD_SEGD4L MMIO32(LCD_BASE + 0x0cc) /**< @see EFM32TG_LCD_SEG_bits */ #define LCD_SEGD5L MMIO32(LCD_BASE + 0x0d0) /**< @see EFM32TG_LCD_SEG_bits */ #define LCD_SEGD6L MMIO32(LCD_BASE + 0x0d4) /**< @see EFM32TG_LCD_SEG_bits */ @@ -116,6 +116,8 @@ /** By this parameter, the voltage V_LCD_OUT is interpolated linearly from * 0.5V_LCD to V_LCD. */ +#define LCD_DISPCTRL_CONLEV_MIN (0<<8) +#define LCD_DISPCTRL_CONLEV_MAX (31<<8) #define LCD_DISPCTRL_CONLEV_MASK (0x1f<<8) #define LCD_DISPCTRL_WAVE_LOWPOWER (0<<4) #define LCD_DISPCTRL_WAVE_NORMAL (1<<4) @@ -197,26 +199,26 @@ /** @} */ -/** Bit states for the LCD_SYNGBUSY register +/** Bit states for the LCD_SYNCBUSY register * * See d0034_efm32tg_reference_manual.pdf section 29.5.17 for definitions. * - * @defgroup EFM32TG_LCD_SYNGBUSY_bits LCD SYNGBUSY bits + * @defgroup EFM32TG_LCD_SYNCBUSY_bits LCD SYNCBUSY bits * @{ */ -#define LCD_SYNGBUSY_SEGD7L (1<<19) -#define LCD_SYNGBUSY_SEGD6L (1<<18) -#define LCD_SYNGBUSY_SEGD5L (1<<17) -#define LCD_SYNGBUSY_SEGD4L (1<<16) -#define LCD_SYNGBUSY_SEGD3L (1<<7) -#define LCD_SYNGBUSY_SEGD2L (1<<6) -#define LCD_SYNGBUSY_SEGD1L (1<<5) -#define LCD_SYNGBUSY_SEGD0L (1<<4) -#define LCD_SYNGBUSY_AREGB (1<<3) -#define LCD_SYNGBUSY_AREGA (1<<2) -#define LCD_SYNGBUSY_BACTRL (1<<1) -#define LCD_SYNGBUSY_CTRL (1<<0) +#define LCD_SYNCBUSY_SEGD7L (1<<19) +#define LCD_SYNCBUSY_SEGD6L (1<<18) +#define LCD_SYNCBUSY_SEGD5L (1<<17) +#define LCD_SYNCBUSY_SEGD4L (1<<16) +#define LCD_SYNCBUSY_SEGD3L (1<<7) +#define LCD_SYNCBUSY_SEGD2L (1<<6) +#define LCD_SYNCBUSY_SEGD1L (1<<5) +#define LCD_SYNCBUSY_SEGD0L (1<<4) +#define LCD_SYNCBUSY_AREGB (1<<3) +#define LCD_SYNCBUSY_AREGA (1<<2) +#define LCD_SYNCBUSY_BACTRL (1<<1) +#define LCD_SYNCBUSY_CTRL (1<<0) /** @} */ diff --git a/include/libopencm3/efm32/tinygecko/lcd.yaml b/include/libopencm3/efm32/tinygecko/lcd.yaml index 1b2b758..0e003bd 100644 --- a/include/libopencm3/efm32/tinygecko/lcd.yaml +++ b/include/libopencm3/efm32/tinygecko/lcd.yaml @@ -87,6 +87,9 @@ registers: length: 5 type: uint doc: "By this parameter, the voltage V_LCD_OUT is interpolated linearly from 0.5V_LCD to V_LCD." + values: + - {value: 0, name: MIN} + - {value: 31, name: MAX} - name: WAVE shift: 4 values: @@ -208,7 +211,7 @@ registers: - {value: 0, name: UPDATE} - {value: 1, name: FREEZE} # FIXME: this seems to be a typical FREEZE register - - name: SYNGBUSY + - name: SYNCBUSY offset: 0x064 definition_baserefext: .5.17 fields: -- cgit v1.2.3