![]() |
Fast LCD I2C driver 1.0
Fast driver for LCDs on I2C for Pi-Pico and Arduino
|
Header file for C wrapper of the LCD_I2C class in Fast LCD for I2C. More...
Go to the source code of this file.
Functions | |
Initialization | |
Set up the lcd display. The I2C pins are not initialized. See LCD_I2C_Setup(). | |
void | lcd_init (byte address, byte columns, byte rows, i2c_inst_t *I2C) |
Initialize the lcd display. More... | |
Writing to the screen on the Pi Pico in C | |
These are the simplist output routines for writing characters to the LCD screen. They are in the spirit of the example in the Pi Pico SDK. Also see the Theory of Operation for hints on maximizing display speed. | |
void | lcd_writeChar (byte val) |
Output a character to the screen. More... | |
void | lcd_writeString (const char str[]) |
Output a string to the screen. Naming is more in the style of the Pico SDK, and the Enable_Buffering parameter can be utilized. More... | |
void | lcd_writeBuffer (const uint8_t *buffer, size_t size) |
Write array of bytes. More... | |
Simple display control | |
void | lcd_setCursor (byte line, byte position) |
Move the input cursor to a location on the screen. More... | |
void | lcd_clear (void) |
Clear the display. More... | |
void | lcd_home (void) |
"Home" the display. More... | |
void | lcd_backlight (void) |
Turn on the display backlight. More... | |
void | lcd_noBacklight (void) |
Turn off the display backlight More... | |
void | lcd_display (void) |
Turns the display on without modifying data on it. More... | |
void | lcd_noDisplay (void) |
Turns the display off without modifying data on it. More... | |
Cursor Appearance Controls | |
The cursor can be displayed on the screen as an underscore at the current location, or as a blinking inversion of the character at the cursor location. Both of these modes can be enabled at once, or they can both be turned off, making the cursor invisible! | |
void | lcd_cursor (void) |
Display the underline cursor at the current cursor location. More... | |
void | lcd_noCursor (void) |
Hides the underline cursor at the current cursor location. More... | |
void | lcd_blink (void) |
Display the blinking inverted cursor at the current cursor location. More... | |
void | lcd_noBlink (void) |
Disable the blinking inverted cursor at the current cursor location. More... | |
Advanced Display Control | |
void | lcd_scrollDisplayLeft (void) |
Scrolls the display and cursor one position to the left. home() will restore it to its original position. More... | |
void | lcd_scrollDisplayRight (void) |
Scrolls the display and cursor one position to the right. home() will restore it to its original position. More... | |
void | lcd_autoscroll (void) |
Turns on automatic scrolling of the display. More... | |
void | lcd_noAutoscroll (void) |
Turns off automatic scrolling of the display. More... | |
void | lcd_leftToRight (void) |
Sets the text direction to left to right. Each character output advances the cursor one position to the right. This is the default condition. More... | |
void | lcd_rightToLeft (void) |
Sets the text direction to right to left. Each character output advances the cursor one position to the left. More... | |
Custom Characters | |
The display can store 8 user defined custom characters. They are stored at "memory addresses" 0-7. They are displayed when character codes 0-7 are written to the display. Of course, character value "0" cannot be included in a string because it would be the string terminator. A 0 can be written using the write single character routines, or the write() method with an array of characters and a character count. As an alternative, the display controller also duplicates the special characters as character codes 8-15 (0x8-0xf), which can be encoded and written as strings. | |
void | lcd_createChar (byte charnum, const byte char_map[]) |
Create a custom character. More... | |
Header file for C wrapper of the LCD_I2C class in Fast LCD for I2C.
These are the wrappers to allow the Fast LCD I2C driver (which is written in C++) to be used from a C program. The interface is simplified, and the buffering commands are not available since C does not allow optional arguments. None the less, this allows users who have not made the transition to C++ to still enjoy substantial speed improvements over most other drivers.
Use of the C++ version is encouraged.