Control and monitor NXP SCCK monochrome LCD display. More...
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_put_pixel (int x, int y, int col) |
Turns On/Off a pixel at (x,y) in Display device. More... | |
void | lcd_set_pixel (int x, int y, int col) |
Turns On/Off a pixel at (x,y) in Display RAM. More... | |
void | lcd_draw_rect (int left, int top, int right, int bottom, int col) |
Draws a rectangle from (top,right) to (bottom,left) More... | |
void | lcd_fill_rect (int left, int top, int right, int bottom, int col) |
Fills a rectangle from (top,right) to (bottom,left) More... | |
void | lcd_draw_line (int x0, int y0, int x1, int y1, int col) |
Draws a line from x0,y0 to x1,y1. More... | |
void | lcd_set_foreground_color (int color) |
Sets the foreground color of font. More... | |
void | lcd_set_background_color (int color) |
Sets the background color of font. More... | |
void | lcd_set_font (const lcd_font_t *font) |
Sets the current font. More... | |
void | lcd_set_char_spacing (int space) |
Sets the space between two chars. More... | |
void | lcd_set_font_width (int width) |
Sets width for fixed width fonts. More... | |
uint32_t | lcd_put_char_xy (int xPos, int yPos, int ch) |
Prints ASCII character at given position. More... | |
void | lcd_put_str_xy (int xPos, int yPos, const char *str) |
Prints ASCII string at given position. More... | |
void | lcd_put_str_centered (const char *str) |
Prints ASCII string centered on screen. More... | |
Detailed Description
Control and monitor NXP SCCK monochrome LCD display.
Function Documentation
void lcd_draw_line | ( | 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
- Examples:
- nxp/nfc3d/local.c.
void lcd_draw_rect | ( | 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
- Examples:
- nxp/lcd_hello_world/main.c, nxp/lcd_scan/main.c, nxp/nfc3d/local.c, and nxp/nxp3d/nxp3d.c.
void lcd_fill_rect | ( | 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
- Examples:
- nxp/nxp3d/nxp3d.c.
void lcd_init | ( | void |
| ) |
Initialize the LCD turns it ON.
- Returns
- Nothing
- Examples:
- nxp/lcd_hello_world/main.c, nxp/lcd_scan/main.c, nxp/nfc3d/local.c, and nxp/nxp3d/nxp3d.c.
uint32_t lcd_put_char_xy | ( | 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
void lcd_put_pixel | ( | 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
void lcd_put_str_centered | ( | const char * | str | ) |
Prints ASCII string centered on screen.
- Parameters
-
str
: Pointer to NUL terminated ASCII string
- Returns
- nothing
- Examples:
- nxp/nxp3d/nxp3d.c.
void lcd_put_str_xy | ( | 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
- Examples:
- nxp/lcd_hello_world/main.c, and nxp/lcd_scan/main.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.
void lcd_set_background_color | ( | int | color | ) |
Sets the background color of font.
- Parameters
-
color
: Color 1 - ON[Black], 0 - OFF[WHITE]
- Returns
- Nothing
- Examples:
- nxp/lcd_hello_world/main.c, nxp/lcd_scan/main.c, nxp/nfc3d/local.c, and nxp/nxp3d/nxp3d.c.
void lcd_set_char_spacing | ( | 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
void lcd_set_font | ( | const lcd_font_t * | font | ) |
Sets the current font.
- Parameters
-
font
: Pointer to a font structure (swim font)
- Returns
- Nothing
void lcd_set_font_width | ( | 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
void lcd_set_foreground_color | ( | int | color | ) |
Sets the foreground color of font.
- Parameters
-
color
: Color 1 - ON[Black], 0 - OFF[WHITE]
- Returns
- Nothing
- Examples:
- nxp/lcd_hello_world/main.c, nxp/lcd_scan/main.c, nxp/nfc3d/local.c, and nxp/nxp3d/nxp3d.c.
void lcd_set_pixel | ( | 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.