Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

gfxdriver.cpp File Reference

#include "clib/hwapi.h"
#include "clib/rtos.h"
#include "bitmap.h"
#include "gfxdriver.h"
#include "misc.h"
#include <stdio.h>
#include <conio.h>
#include <string.h>

Go to the source code of this file.

Functions

void LCD_Update (Bitmap *bm)
 Update the LCD Display.

void LCD_Clear (unsigned char pattern)
 Clear the LCD Display.

void LCD_SetBrightness (int level)
 Set display brightness.

void LCD_Init ()
 LCD_Init() must be called, before using any of the other LCD functions.

void LCD_Done ()
 Shut down the LCD controller.


Function Documentation

void LCD_Clear unsigned char    pattern
 

Clear the LCD Display.

Parameters:
pattern  pattern to clear with (0x00 is all clear, 0xff is all set)
Note:
Takes 578us on a 20MHz SC12.

Definition at line 152 of file gfxdriver.cpp.

References LCD_IOBASE0, LCD_IOBASE1, LCD_PAGES, and LCD_WIDTH.

void LCD_Done  
 

Shut down the LCD controller.

Definition at line 242 of file gfxdriver.cpp.

References hal_stop_timer(), LCD_IOBASE0, LCD_IOBASE1, pfe_enable_pio(), and PIO_IPD.

Referenced by main().

void LCD_Init  
 

LCD_Init() must be called, before using any of the other LCD functions.

The display gets initialized, and cleared.

Definition at line 215 of file gfxdriver.cpp.

References LCD_Clear(), LCD_IOBASE0, LCD_IOBASE1, LCD_SetBrightness(), pfe_enable_bus(), pfe_enable_pcs(), and pfe_enable_timer().

Referenced by main().

void LCD_SetBrightness int    level
 

Set display brightness.

This function MUST be called during initialization, because it sets up the vertical refresh timer for the LCD. (the brightness PWM signal is derived from that clock)

Parameters:
level  brigthness level 0..255

Definition at line 190 of file gfxdriver.cpp.

References GET_FRQ_TIMER, hal_get_frequencies(), hal_init_timer(), hal_set_duty_cycle_waveform(), and hal_start_timer().

void LCD_Update Bitmap   bm
 

Update the LCD Display.

Parameters:
bm  Bitmap to copy to the display.
Note:
Takes 370us on a 20MHz SC12, 122x32. (1250us if LCD_UPSIDEDOWN is defined.)

Definition at line 69 of file gfxdriver.cpp.

References Bitmap::bmBits, LCD_IOBASE0, LCD_IOBASE1, LCD_PAGES, LCD_WIDTH, src, and Bitmap::width.


Generated on Sun Aug 4 21:47:37 2002 for k/os mp3v2 by doxygen1.2.16