LPCOpen Platform for LPC112X microcontrollers  112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
Data Structures | Macros | Functions
lcd_st7565s.h File Reference

Go to the source code of this file.

Data Structures

struct  FONT_T
 

Macros

#define LCD_X_RES   128
 
#define LCD_Y_RES   64
 
#define __LPC_FONTS_H_
 

Functions

void LCD_Init (void)
 Initialize the LCD turns it ON. More...
 
void LCD_Refresh (int left, int top, int right, int bottom)
 Update content of Display RAM to Display device. More...
 
void LCD_PutPixel (int x, int y, int col)
 Turns On/Off a pixel at (x,y) in Display device. More...
 
void LCD_SetPixel (int x, int y, int col)
 Turns On/Off a pixel at (x,y) in Display RAM. More...
 
void LCD_DrawRect (int left, int top, int right, int bottom, int col)
 Draws a rectangle from (top,right) to (bottom,left) More...
 
void LCD_FillRect (int left, int top, int right, int bottom, int col)
 Fills a rectangle from (top,right) to (bottom,left) More...
 
void LCD_DrawLine (int x0, int y0, int x1, int y1, int col)
 Draws a line from x0,y0 to x1,y1. More...
 
void LCD_SetFontColor (int color)
 Sets the foreground color of font. More...
 
void LCD_SetFontBgColor (int color)
 Sets the background color of font. More...
 
void LCD_SetFont (const FONT_T *font)
 Sets the current font. More...
 
void LCD_SetFontCharSpace (int space)
 Sets the space between two chars. More...
 
void LCD_SetFontWidth (int width)
 Sets width for fixed width fonts. More...
 
uint32_t LCD_PutCharXY (int xPos, int yPos, int ch)
 Prints ASCII character at given position. More...
 
void LCD_PutStrXY (int xPos, int yPos, const char *str)
 Prints ASCII string at given position. More...
 

Macro Definition Documentation

#define __LPC_FONTS_H_

Definition at line 56 of file lcd_st7565s.h.

#define LCD_X_RES   128

Definition at line 40 of file lcd_st7565s.h.

#define LCD_Y_RES   64

Definition at line 41 of file lcd_st7565s.h.

Function Documentation

void LCD_DrawLine ( int  x0,
int  y0,
int  x1,
int  y1,
int  col 
)

Draws a line from x0,y0 to x1,y1.

Parameters
x0: X0
y0: Y0
x1: X1
y1: Y1
col: Color of the pixel (0 - OFF[WHITE]; 1 - ON[BLACK])
Returns
Nothing

Definition at line 215 of file lcd_st7565s.c.

void LCD_DrawRect ( int  left,
int  top,
int  right,
int  bottom,
int  col 
)

Draws a rectangle from (top,right) to (bottom,left)

Parameters
left: Left coordinate [X coordinate]
top: Top coordinate [Y coordinate]
right: Right coordinate [X coordinate]
bottom: Bottom coorinate [Y coordinate]
col: Color of the pixel (0 - OFF[WHITE]; 1 - ON[BLACK])
Returns
Nothing

Definition at line 186 of file lcd_st7565s.c.

void LCD_FillRect ( int  left,
int  top,
int  right,
int  bottom,
int  col 
)

Fills a rectangle from (top,right) to (bottom,left)

Parameters
left: Left coordinate [X coordinate]
top: Top coordinate [Y coordinate]
right: Right coordinate [X coordinate]
bottom: Bottom coorinate [Y coordinate]
col: Color of the pixel (0 - OFF[WHITE]; 1 - ON[BLACK])
Returns
Nothing

Definition at line 202 of file lcd_st7565s.c.

void LCD_Init ( void  )

Initialize the LCD turns it ON.

Returns
Nothing

Definition at line 118 of file lcd_st7565s.c.

uint32_t LCD_PutCharXY ( int  xPos,
int  yPos,
int  ch 
)

Prints ASCII character at given position.

Parameters
xPos: x Position in pixels
yPos: y Position in pixels
ch: ASCII character (int casted)
Returns
Next char's x Position in lower half word and next char's y position in upper half word

Definition at line 262 of file lcd_st7565s.c.

void LCD_PutPixel ( int  x,
int  y,
int  col 
)

Turns On/Off a pixel at (x,y) in Display device.

Parameters
x: X coordinate of the pixel
y: Y coordinate of the pixel
col: Color of the pixel (0 - OFF[WHITE]; 1 - ON[BLACK])
Returns
Nothing

Definition at line 179 of file lcd_st7565s.c.

void LCD_PutStrXY ( int  xPos,
int  yPos,
const char *  str 
)

Prints ASCII string at given position.

Parameters
xPos: x Position in pixels
yPos: y Position in pixels
str: Pointer to NUL terminated ASCII string
Returns
nothing

Definition at line 288 of file lcd_st7565s.c.

void LCD_Refresh ( int  left,
int  top,
int  right,
int  bottom 
)

Update content of Display RAM to Display device.

Parameters
left: Left coordinate [X coordinate]
top: Top coordinate [Y coordinate]
right: Right coordinate [X coordinate]
bottom: Bottom coorinate [Y coordinate]
Returns
Nothing
Note
left should not be greater than right and top should not be greater than bottom, if not the behavior is undefined.

Definition at line 134 of file lcd_st7565s.c.

void LCD_SetFont ( const FONT_T font)

Sets the current font.

Parameters
font: Pointer to a font structure (swim font)
Returns
Nothing

Definition at line 250 of file lcd_st7565s.c.

void LCD_SetFontBgColor ( int  color)

Sets the background color of font.

Parameters
color: Color 1 - ON[Black], 0 - OFF[WHITE]
Returns
Nothing

Definition at line 238 of file lcd_st7565s.c.

void LCD_SetFontCharSpace ( int  space)

Sets the space between two chars.

Parameters
space: Space in pixels
Returns
Nothing
Note
This functions sets the space that will be left between chars in addition to the default space provided by the font itself

Definition at line 256 of file lcd_st7565s.c.

void LCD_SetFontColor ( int  color)

Sets the foreground color of font.

Parameters
color: Color 1 - ON[Black], 0 - OFF[WHITE]
Returns
Nothing

Definition at line 232 of file lcd_st7565s.c.

void LCD_SetFontWidth ( int  width)

Sets width for fixed width fonts.

Parameters
width: Width of a single char in pixels
Returns
Nothing
Note
This width is effective only for fonts that has fixed with and having the width table initialized to null

Definition at line 244 of file lcd_st7565s.c.

void LCD_SetPixel ( int  x,
int  y,
int  col 
)

Turns On/Off a pixel at (x,y) in Display RAM.

Parameters
x: X coordinate of the pixel
y: Y coordinate of the pixel
col: Color of the pixel (0 - OFF[WHITE]; 1 - ON[BLACK])
Returns
Nothing
Note
Set pixel will not display the pixel until LCD_Refresh is called for the region containing this pixel.

Definition at line 161 of file lcd_st7565s.c.