![]() |
PsiSwarm Library
0.8
|
#include <display.h>
Public Member Functions | |
| Display () | |
| Display (PinName sda, PinName scl, PinName reset, PinName backlight) | |
| void | clear_display (void) |
| void | home (void) |
| void | write_string (char *message) |
| void | write_string (char *message, char length) |
| void | set_position (char row, char column) |
| void | set_cursor (char enable) |
| void | set_blink (char enable) |
| void | set_display (char enable) |
| void | set_backlight_brightness (float brightness) |
| void | debug_page (char *message, char length) |
| void | IF_restore_page (void) |
| void | IF_debug_multipage (void) |
| void | IF_backlight_toggle (void) |
| void | post_init (void) |
| void | post_post_init (void) |
| int | i2c_message (char byte) |
| void | init_display (char mode) |
| int | disp_putc (int c) |
Display class Functions for use with the Midas 16x2 I2C LCD Display (MCCOG21605x6W) LCD Farnell part 2218942 or 2063206
Example:
| Display::Display | ( | ) |
Create the LCD Display object connected to the default pins (sda = p28, scl = p27, reset = p29, backlight = p30)
Definition at line 47 of file display.cpp.
| Display::Display | ( | PinName | sda, |
| PinName | scl, | ||
| PinName | reset, | ||
| PinName | backlight | ||
| ) |
Create the LCD Display object connected to specific pins
| sda | pin - default is p28 |
| scl | pin - default is p27 |
| reset | pin - default is p29 |
| backlight | pin - default is p30 |
Definition at line 44 of file display.cpp.
| void Display::clear_display | ( | void | ) |
Clear the display
Definition at line 230 of file display.cpp.
| void Display::home | ( | void | ) |
Set cursor to home position
Definition at line 238 of file display.cpp.
| void Display::set_backlight_brightness | ( | float | brightness | ) |
Set the brightness of the backlight
| brightness | - Sets the brightness of the display (range 0.0 to 1.0) |
Definition at line 198 of file display.cpp.
| void Display::set_blink | ( | char | enable | ) |
Enable or disable cursor blink
| enable | - Set to 1 to enable the cursor blinking mode |
Definition at line 188 of file display.cpp.
| void Display::set_cursor | ( | char | enable | ) |
Enable or disable cursor
| enable | - Set to 1 to enable the cursor visibility |
Definition at line 183 of file display.cpp.
| void Display::set_display | ( | char | enable | ) |
Enable or disable display
| enable | - Set to 1 to enable the display output |
Definition at line 193 of file display.cpp.
| void Display::set_position | ( | char | row, |
| char | column | ||
| ) |
Set the row and column of cursor position
| row | - The row of the display to set the cursor to (either 0 or 1) |
| column | - The column of the display to set the cursor to (range 0 to 15) |
Definition at line 174 of file display.cpp.
| void Display::write_string | ( | char * | message | ) |
Print string message
| message | - The null-terminated message to print |
Definition at line 131 of file display.cpp.
| void Display::write_string | ( | char * | message, |
| char | length | ||
| ) |
Print string message of given length
| message | - The message to print |
| length | - The number of characters to display |
Definition at line 154 of file display.cpp.