lcd_32122a.c File Reference
Displaytech 32122A LCD driver. More...
#include "lcd_32122a.h"#include <gfx/gfx.h>#include "hw/hw_lcd_32122a.h"#include "cfg/cfg_lcd_32122a.h"#include <cfg/macros.h>#include <cfg/debug.h>#include <cfg/module.h>#include <drv/timer.h>#include <drv/pwm.h>#include <cpu/irq.h>#include <cpu/types.h>Go to the source code of this file.
Defines | |
| #define | LCD_PAGES 4 |
| Number of LCD pages. | |
| #define | LCD_PAGESIZE (LCD_WIDTH / 2) |
| Width of an LCD page. | |
32122A Commands | |
| #define | LCD_CMD_DISPLAY_ON 0xAF |
| #define | LCD_CMD_DISPLAY_OFF 0xAE |
| #define | LCD_CMD_STARTLINE 0xC0 |
| #define | LCD_CMD_PAGEADDR 0xB8 |
| #define | LCD_CMD_COLADDR 0x00 |
| #define | LCD_CMD_ADC_LEFT 0xA1 |
| #define | LCD_CMD_ADC_RIGHT 0xA0 |
| #define | LCD_CMD_STATIC_OFF 0xA4 |
| #define | LCD_CMD_STATIC_ON 0xA5 |
| #define | LCD_CMD_DUTY_32 0xA9 |
| #define | LCD_CMD_DUTY_16 0xA8 |
| #define | LCD_CMD_RMW_ON 0xE0 |
| #define | LCD_CMD_RMW_OFF 0xEE |
| #define | LCD_CMD_RESET 0xE2 |
Functions | |
| uint8_t | lcd_32122_read (uint8_t chip) |
| void | lcd_32122_write (uint8_t c, uint8_t chip) |
| void | lcd_32122_setPwm (int duty) |
| Set LCD contrast PWM. | |
| void | lcd_32122_blitBitmap (const Bitmap *bm) |
| Update the LCD display with data from the provided bitmap. | |
| void | lcd_32122_init (void) |
| Initialize LCD subsystem. | |
Variables | |
| static uint8_t | lcd_raster [RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)] |
| Raster buffer to draw into. | |
| struct Bitmap | lcd_bitmap |
| Default LCD bitmap. | |
Detailed Description
Displaytech 32122A LCD driver.
Definition in file lcd_32122a.c.
Function Documentation
| void lcd_32122_init | ( | void | ) |
Initialize LCD subsystem.
- Note:
- The PWM used for LCD contrast is initialized in drv/pwm.c because it is the same PWM used for output attenuation.
Definition at line 306 of file lcd_32122a.c.
| uint8_t lcd_32122_read | ( | uint8_t | chip | ) | [inline] |
__________________
A0 __/ \__
____________
R/W __/ \__
_______
E1 _____/ \____
DATA -------<=====>----
Definition at line 171 of file lcd_32122a.c.
| void lcd_32122_write | ( | uint8_t | c, | |
| uint8_t | chip | |||
| ) | [inline] |
__________________
A0 ___/ \___
R/W __________________
______
E1 _____/ \_____
DATA -<==============>-
Definition at line 204 of file lcd_32122a.c.
Variable Documentation
uint8_t lcd_raster[RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)] [static] |
Raster buffer to draw into.
Bits in the bitmap bytes have vertical orientation, as required by the LCD driver.
Definition at line 132 of file lcd_32122a.c.
