lcd.h File Reference

Prototypes of Nokia 6610 LCD handling functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LCD_PRINTF_BUF_SIZE   256
#define LCD_BKLGHT_ON   1
#define LCD_BKLGHT_OFF   0
#define LCD_X_OFFSET   0
#define LCD_Y_OFFSET   2
#define LCD_COLOR_BLACK   0x070
 Black color.
#define LCD_COLOR_YELLOW   0x1EF
 Yellow color.
#define LCD_COLOR_GRAY   0xCCC
 Gray.
#define LCD_COLOR_BLUE   0xF00
 Blue.
#define LCD_COLOR_GREEN   0x0F0
 Green.
#define LCD_COLOR_RED   0x00F
 Red.
#define LCD_COLOR_WHITE   0xFFF
 White.
#define LCD_DEFAULT_FG_COLOR   LCD_COLOR_BLACK
#define LCD_DEFAULT_BG_COLOR   LCD_COLOR_WHITE
#define LCD_WIDTH   (130)
 in pixels
#define LCD_HEIGHT   (131)
 in pixels
#define LCD_COLORS   (4096)
 12 bits
#define LCD_MEM_SIZE   (25740)
 130*132*12/8
#define DISON   0xAF
#define DISOFF   0xAE
#define DISPLAYON   DISON
#define DISPLAYOFF   DISOFF
#define DISNOR   0xA6
#define DISINV   0xA7
#define COMSCN   0xBB
#define DISCTL   0xCA
#define SLPIN   0x95
#define SLPOUT   0x94
#define PASET   0x75
#define CASET   0x15
#define PAGEADDRSET   PASET
#define COLADDRSET   CASET
#define DATCTL   0xBC
#define RGBSET8   0xCE
#define RAMWR   0x5C
#define MEMWRITE   RAMWR
#define RAMRD   0x5D
#define PTLIN   0xA8
#define PTLOUT   0xA9
#define RMWIN   0xE0
#define RMWOUT   0xEE
#define ASCSET   0xAA
#define SCSTART   0xAB
#define IOSCON   0xD1
#define IOSCOFF   0xD2
#define PWRCTR   0x20
#define VOLCTR   0x81
#define VOLUP   0xD6
#define VOLDOWN   0xD7
#define TMPGRD   0x82
#define EPCTIN   0xCD
#define EPCOUT   0xCC
#define EPMWR   0xFC
#define EPMRD   0xFD
#define EPSRRD1   0x7C
#define EPSRRD2   0x7D
#define NOP   0x25

Functions

void LCD_init (void)
void LCD_setBacklight (unsigned char state)
void LCD_write130x130bmp (const unsigned char *bmp)
void LCD_write130x130bmpStart ()
void LCD_write130x130bmpData16 (const uint16_t *data)
void LCD_write130x130bmpData8 (const uint8_t *data)
void LCD_write130x130bmpEnd ()
void LCD_clear (void)
void LCD_clearBall (unsigned char x, unsigned char y)
void LCD_writeBall (unsigned char x, unsigned char y)
void LCD_setContrast (unsigned char contrast)
void LCD_writeChar (unsigned char Ascii, unsigned char x, unsigned char y, unsigned short FG_Colour, unsigned short BG_Colour)
void LCD_setX (uint8_t x)
void LCD_setY (uint8_t y)
uint8_t LCD_getX ()
uint8_t LCD_getY ()
void LCD_setXY (uint8_t x, uint8_t y)
void LCD_setFGColor (uint16_t fgColor)
void LCD_setBGColor (uint16_t bgColor)
void LCD_setColor (uint16_t fgColor, uint16_t bgColor)
void LCD_write (const char *buf, uint16_t length)
void LCD_printf (const char *fmt,...)


Detailed Description

Prototypes of Nokia 6610 LCD handling functions.

Author:
Peter Ivanov, Olimex Ltd.

Definition in file lcd.h.


Function Documentation

void LCD_clear ( void   ) 

Clear display.

Definition at line 426 of file lcd.c.

void LCD_clearBall ( unsigned char  x,
unsigned char  y 
)

Clears ball symbol.

Parameters:
x Coordinate X.
y Coordinate Y.

Definition at line 466 of file lcd.c.

uint8_t LCD_getX (  )  [inline]

Get coordinate Y. This data is used by LCD_printf() and LCD_write().

See also:
LCD_HEIGHT
Returns:
X coordinate. Valid values: 0..LCD_WIDTH.

Definition at line 604 of file lcd.c.

uint8_t LCD_getY (  )  [inline]

Get coordinate Y. This data is used by LCD_printf() and LCD_write().

See also:
LCD_HEIGHT
Returns:
Y coordinate. Valid values: 0..LCD_HEIGHT.

Definition at line 609 of file lcd.c.

void LCD_init ( void   ) 

Initializes LCD.

Definition at line 44 of file lcd.c.

void LCD_printf ( const char *  fmt,
  ... 
)

Write a formatted string to the LCD. Example:

LCD_setXY (0, LCD_HEIGHT - FONT_HEIGHT);
LCD_setColor (LCD_COLOR_RED, LCD_COLOR_WHITE);
LCD_printf ("I %02i", i);

Author:
Peter Ivanov
Parameters:
fmt Printf format string. e.g.: "I %02i"

Definition at line 630 of file lcd.c.

void LCD_setBacklight ( unsigned char  state  ) 

Switch on/off backlight

Parameters:
state FALSE: switch on, TRUE: switch off

Definition at line 139 of file lcd.c.

void LCD_setBGColor ( uint16_t  bgColor  )  [inline]

Set backround's color. This data is used by LCD_printf() and LCD_write().

Parameters:
bgColor Color of background (12 bit). Example: LCD_COLOR_RED

Definition at line 619 of file lcd.c.

void LCD_setColor ( uint16_t  fgColor,
uint16_t  bgColor 
) [inline]

Set color of foreground and background. This data is used by LCD_printf() and LCD_write().

Parameters:
fgColor Color of foreground (12 bit). Example: LCD_COLOR_WHITE
bgColor Color of background (12 bit). Example: LCD_COLOR_RED

Definition at line 624 of file lcd.c.

void LCD_setContrast ( unsigned char  contrast  ) 

Set display's contrast. Supported only on type GE8!

Parameters:
contrast Valid values: 0..223 (?)

Definition at line 151 of file lcd.c.

void LCD_setFGColor ( uint16_t  fgColor  )  [inline]

Set foreground's color. This data is used by LCD_printf() and LCD_write().

Parameters:
fgColor Color of foreground (12 bit). Example: LCD_COLOR_WHITE

Definition at line 614 of file lcd.c.

void LCD_setX ( uint8_t  x  )  [inline]

Set coordinate X. This data is used by LCD_printf() and LCD_write().

See also:
LCD_WIDTH
Parameters:
x X coordinate. Valid values: 0..LCD_WIDTH.

Definition at line 588 of file lcd.c.

void LCD_setXY ( uint8_t  x,
uint8_t  y 
) [inline]

Set coordinates X and Y. This data is used by LCD_printf() and LCD_write().

See also:
LCD_HEIGHT, LCD_WIDTH
Parameters:
x X coordinate. Valid values: 0..LCD_WIDTH.
y Y coordinate. Valid values: 0..LCD_HEIGHT.

Definition at line 598 of file lcd.c.

void LCD_setY ( uint8_t  y  )  [inline]

Set coordinate Y. This data is used by LCD_printf() and LCD_write().

See also:
LCD_HEIGHT
Parameters:
y Y coordinate. Valid values: 0..LCD_HEIGHT.

Definition at line 593 of file lcd.c.

void LCD_write ( const char *  buf,
uint16_t  length 
)

Write a character buffer to LCD.

Author:
Peter Ivanov
Parameters:
buf Pointer to buffer.
length Length of buffer.

Definition at line 641 of file lcd.c.

void LCD_write130x130bmp ( const unsigned char *  bmp  ) 

Displays a bitmap array. Bitmap size is equal to LCD_MEM_SIZE (25740).

Parameters:
bmp Pointer to the bitmap array.

Definition at line 411 of file lcd.c.

void LCD_write130x130bmpData16 ( const uint16_t *  data  ) 

Put one word to the LCD's memory.

See also:
LCD_write130x130bmpStart, LCD_write130x130bmpData8, LCD_write130x130bmpEnd
Parameters:
data One word of bitmap.

Definition at line 390 of file lcd.c.

void LCD_write130x130bmpData8 ( const uint8_t *  data  ) 

Put one byte to the LCD's memory.

See also:
LCD_write130x130bmpStart, LCD_write130x130bmpData16, LCD_write130x130bmpEnd
Parameters:
data One byte of bitmap.

Definition at line 396 of file lcd.c.

void LCD_write130x130bmpEnd (  ) 

Switches on the display, so the bitmap will be visible.

See also:
LCD_write130x130bmpStart, LCD_write130x130bmpData8, LCD_write130x130bmpData16

Definition at line 400 of file lcd.c.

void LCD_write130x130bmpStart (  ) 

Initializes LCD to show a bitmap. You should put the data byte by byte or word by word to the memory using LCD_write130x130bmpData16() or LCD_write130x130bmpData8(). After that you should call LCD_write130x130bmpEnd(). Bitmap size is equal to LCD_MEM_SIZE (25740).

See also:
LCD_write130x130bmpData16, LCD_write130x130bmpData8, LCD_write130x130bmpEnd, LCD_MEM_SIZE

Definition at line 370 of file lcd.c.

void LCD_writeBall ( unsigned char  x,
unsigned char  y 
)

Draws ball symbol.

Parameters:
x Coordinate X.
y Coordinate Y.

Definition at line 499 of file lcd.c.

void LCD_writeChar ( unsigned char  Ascii,
unsigned char  x,
unsigned char  y,
unsigned short  FG_Colour,
unsigned short  BG_Colour 
)

Write a character to specified position with specified color. LCD_printf() is a bit more user friendly.

See also:
LCD_printf()

Definition at line 524 of file lcd.c.


Generated on Sun Dec 9 17:17:10 2007 for Sample MSP430-4619LCD Project by  doxygen 1.5.1