modm API documentation
|
#include <modm/driver/display/hd44780.hpp>
Public Types | |
enum | Command { ClearDisplay = 0b00000001, ResetCursor = 0b00000010, IncrementCursor = 0b00000110, DecrementCursor = 0b00000100, DisableDisplay = 0b00001000, EnableDisplay = 0b00001100, DisableCursor = 0b00001000, EnableCursor = 0b00001010, DisableCursorBlink = 0b00001000, EnableCursorBlink = 0b00001001, ShiftCursorLeft = 0b00010000, ShiftCursorRight = 0b00010100 } |
Public Member Functions | |
Hd44780Dual (uint8_t width, uint8_t height) | |
Constructor. | |
void | initialize () |
Initialize the display. More... | |
virtual void | writeRaw (char c) |
virtual void | setCursor (uint8_t column, uint8_t line) |
void | execute (Command command) |
void | clear () |
IOStream & | ascii () |
set the output mode to ASCII style for integer types | |
IOStream & | bin () |
set the output mode to binary style for integer types | |
IOStream & | endl () |
IOStream & | flush () |
IOStream & | get (char &c) |
Reads one character and returns it if available. Otherwise, returns IOStream::eof. | |
IOStream & | get (char *s, size_t n) |
template<size_t N> | |
IOStream & | get (char (&s)[N]) |
IOStream & | hex () |
set the output mode to hexadecimal style for integer types | |
IOStream & | operator<< (const bool &v) |
IOStream & | operator<< (const char &v) |
IOStream & | operator<< (const uint8_t &v) |
IOStream & | operator<< (const int16_t &v) |
IOStream & | operator<< (const uint16_t &v) |
IOStream & | operator<< (const int32_t &v) |
IOStream & | operator<< (const uint32_t &v) |
IOStream & | operator<< (const char *s) |
IOStream & | operator<< (const void *p) |
write the hex value of a pointer | |
template<class Ret , class... Args> | |
IOStream & | operator<< (Ret (*pointer)(Args...)) |
Write the hex value of any function pointer. | |
IOStream & | operator<< (IOStream &(*format)(IOStream &)) |
void | write (char c) |
Static Public Attributes | |
static constexpr char | eof = -1 |
Protected Typedefs | |
using | driver1 = Hd44780Base< DATA, RW, RS, E1 > |
using | driver2 = Hd44780Base< DATA, RW, RS, E2 > |
Protected Attributes | |
uint8_t | column |
uint8_t | line |
uint8_t | lineCount |
uint8_t | lineWidth |
Writer | writer |
Driver for HD447800 compatible displays with two controller
This driver supports two controllers, with any configuration up to 160 characters like 40x4. You can choose to use a 4bit bus or a 8bit bus, simply by providing one with the propriate width.
DATA | A 8bit or 4bit Port. |
RW | Read/Write-Select Pin |
RS | Command/Data-Select Pin |
E1 | Enable Pin 1 |
E2 | Enable Pin 2 |
|
inherited |
|
inherited |
reads characters into NULL delimited c string in contrast to the standard implementation, this does not care about newline characters in the input
void modm::Hd44780Dual< DATA, RW, RS, E1, E2 >::initialize | ( | ) |
Initialize the display.
The display needs some time to initialize after startup. You have to wait at least 50 ms after startup before calling this method.
|
virtual |
Set cursor to specified position
column | horizontal position |
line | vertical position |
Implements modm::CharacterDisplay.
|
inherited |
Write a character
This method provides an automatic wrap-round if the output reaches the end of the current line or a newline character is detected.
Use writeRaw() if this behavior is not wanted.
|
virtual |
Write a raw character at cursor position
Unlike write() no further processing will occur.
Implements modm::CharacterDisplay.