This is an old revision of the document!


Table of Contents

Graphisches LCD

Related to: [HW] lcd

Diese Bibliothek enthält Funktionen um das HomeLab graphische LCD zu nutzen. Auch wenn das LCD graphische Bilder wiedergeben kann, sind solche Funktionen nicht in der Bibliothek enthalten. Das LCD wird als 14 x 6 Buchstaben alphanumerisches Display genutzt.

Funktionen

  • void lcd_gfx_init(void)

Intialisiert das LCD.

  • void lcd_gfx_backlight(bool set)

Schaltet das LCD Backlight an/aus. Parameter:

  • set - true when backlight on, false when off.
  • void lcd_gfx_clear(void)

Löscht das gesamte Display

  • void lcd_gfx_clear_line(unsigned char line)

Löscht eine Zeile Text. Parameter:

  • line - Zeilennummer. 0 bis 5.
  • void lcd_gfx_goto_char_xy(unsigned char x, unsigned char y)

Wählt eine Position zum Beschreiben aus.. Parameter:

  • x - X Koordinate. 0 bis 13.
  • y - Y Koordinate. 0 bis 5.
  • void lcd_gfx_write_char(char c)

Schreibt einen Buchstaben an die vorherbestimmte Position. Parameter:

  • c - ASCII character.
  • void lcd_gfx_write_string(char *s)

Schreibt einen String an die vorherbestimmte Position. Parameter:

  • s - Pointer to string (char array).

Beispiel

Veranschaulichung wie man das graphische LCD nutzt.

#include <homelab/module/lcd_gfx.h>
 
int main(void)
{
	// LCD initialization.
	lcd_gfx_init();
 
	// Display clearing.
	lcd_gfx_clear();
 
	// Cursor to the middle of the screen.
	lcd_gfx_goto_char_xy(5, 2);
 
	// Displaying a text.
	lcd_gfx_write_string("Hello");
}
de/software/homelab/library/module/lcd_graphic.1281879041.txt.gz · Last modified: (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0