#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <inttypes.h>
#include "main/lcd.h"
#include "main/rom.h"
#include "delay.h"
#include "utils.h"
Go to the source code of this file.
Defines | |
#define | WBF_MASTER 0x04 |
#define | WBF_SLAVE 0x02 |
#define | WBF_MODE_DATA 0x01 |
#define | WBF_MODE_CMD 0x00 |
#define | CMD_DISPLAY_ON 0x3f |
#define | CMD_DISPLAY_OFF 0x3e |
#define | CMD_SET_START 0xC0 |
#define | CMD_SET_PAGE 0xB8 |
#define | CMD_SET_COLUMN 0x40 |
#define | send_cmd(a, b) write_byte(a, b | WBF_MODE_CMD) |
#define | send_all_cmd(a) send_cmd(a, WBF_MASTER | WBF_SLAVE) |
#define | RES_PORT PORTC |
#define | RES_BIT PC5 |
#define | RS_PORT PORTE |
#define | RS_BIT PE3 |
#define | RW_PORT PORTE |
#define | RW_BIT PE4 |
#define | E_PORT PORTE |
#define | E_BIT PE5 |
#define | CS1_PORT PORTC |
#define | CS1_BIT PC7 |
#define | CS2_PORT PORTC |
#define | CS2_BIT PC6 |
#define | LED_PORT PORTD |
#define | LED_BIT PD7 |
Functions | |
uint8_t | lcd_str_width (uint8_t *text) |
Calculate string width in pixels. | |
void | lcd_print (uint8_t x, uint8_t y, uint8_t inverted, char *text) |
Print string on display. | |
void | lcd_v_line (uint8_t x, uint8_t y1, uint8_t y2) |
Draw a vertical line. | |
void | lcd_h_line (uint8_t x1, uint8_t x2, uint8_t y) |
Draw a horizontal line. | |
void | lcd_put_image (uint8_t x, uint8_t y, PGM_P image) |
Put an image on the display. | |
void | lcd_clear_line (uint8_t x1, uint8_t x2, uint8_t y) |
void | lcd_clear (void) |
void | lcd_init (void) |
void | lcd_activate (void) |
void | lcd_deactivate (void) |
void | lcd_enable_backlight (void) |
void | lcd_disable_backlight (void) |
This file contains basic low level routines to drive a lcd using the ks0108b segemtn driver.
Definition in file lcd.c.
|
Activate display. Definition at line 351 of file lcd.c. Referenced by main(). |
|
Clear diplay. Definition at line 320 of file lcd.c. Referenced by lcd_init(). |
|
Clear a part of a page. |
|
Enter power save mode. |
|
Switch backlight off. Definition at line 377 of file lcd.c. Referenced by INTERRUPT(), and main(). |
|
Switch backlight on. Definition at line 369 of file lcd.c. Referenced by INTERRUPT(). |
|
Initialize lcd-display. Definition at line 335 of file lcd.c. References lcd_clear(). Referenced by main(). |
|
Print string on display.
|
|
Put an image on the display.
|