COSA
An Object-Oriented Platform for Arduino Programming
|
#include <VLCD.hh>
Classes | |
class | Slave |
Public Types | |
enum | TextMode { NORMAL_TEXT_MODE = 0x00, INVERTED_TEXT_MODE = 0xff } |
Public Member Functions | |
VLCD (uint8_t addr=0x5a) | |
virtual bool | begin () |
virtual bool | end () |
virtual void | backlight_on () |
virtual void | backlight_off () |
virtual void | display_on () |
virtual void | display_off () |
virtual void | display_clear () |
virtual void | set_cursor (uint8_t x, uint8_t y) |
virtual int | putchar (char c) |
virtual int | write (const void *buf, size_t size) |
virtual void | display_contrast (uint8_t level) |
virtual void | display_normal () |
virtual void | display_inverse () |
void | get_cursor (uint8_t &x, uint8_t &y) const |
uint8_t | get_tab_step () const |
void | set_tab_step (uint8_t step) |
TextMode | text_mode (TextMode mode) |
void | non_blocking () |
void | blocking () |
bool | is_blocking () const |
void | eol (Mode mode) |
Mode | eol () const |
virtual int | available () |
virtual int | room () |
virtual int | puts (const char *s) |
virtual int | puts (str_P s) |
virtual int | write (const iovec_t *vec) |
virtual int | write_P (const void *buf, size_t size) |
virtual int | peekchar () |
virtual int | peekchar (char c) |
virtual int | getchar () |
virtual char * | gets (char *s, size_t count) |
virtual int | read (void *buf, size_t size) |
virtual int | read (iovec_t *vec) |
virtual int | flush () |
virtual void | empty () |
Public Attributes | |
uint8_t | MAJOR |
uint8_t | MINOR |
uint8_t | WIDTH |
uint8_t | HEIGHT |
Protected Attributes | |
uint8_t | m_x |
Cursor position x. More... | |
uint8_t | m_y |
Cursor position y. More... | |
uint8_t | m_tab |
Tab step. More... | |
uint8_t | m_mode |
Text mode. More... | |
bool | m_blocking |
Mode | m_eol |
Private Member Functions | |
bool | is_async () const |
void | sync_request () |
void | async_request () |
virtual void | on_completion (uint8_t type, int count) |
Private Attributes | |
uint8_t | m_addr |
bool | m_async |
Virtual Dot Matix Liquid Crystal Display Controller/Driver for LCD/IOStream access. Acts as a proxy for an LCD slave.
|
inherited |
|
inline |
|
virtualinherited |
Number of bytes available (possible to read).
Reimplemented in W5200::Driver, W5500::Driver, W5100::Driver, Soft::UART, UART, IOBuffer< SIZE >, and CC3000::Driver.
Definition at line 24 of file IOStream_Device.cpp.
|
virtual |
Turn display backlight off.
Reimplemented from LCD::Device.
|
virtual |
|
virtual |
Start display for text output. Initiate display and retrieve version and dimension information (MAJOR/MINOR and WIDTH/HEIGHT). Returns true if successful otherwise false.
Implements LCD::Device.
|
inlineinherited |
Set blocking mode.
Definition at line 85 of file IOStream.hh.
|
virtual |
Clear display and move cursor to home.
Implements LCD::Device.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
virtual |
|
virtual |
|
virtualinherited |
Empty internal device buffers.
Reimplemented in Soft::UART, UART, and IOBuffer< SIZE >.
Definition at line 175 of file IOStream_Device.cpp.
|
virtual |
Stop display and power down. Returns true if successful otherwise false.
Implements LCD::Device.
|
inlineinherited |
Set end of line mode.
[in] | mode | for end of line. |
Definition at line 103 of file IOStream.hh.
|
inlineinherited |
|
virtualinherited |
Flush internal device buffers. Wait for device to become idle.
Reimplemented in W5200::Driver, W5500::Driver, W5100::Driver, UART, IOBuffer< SIZE >, CC3000::Driver, and WIO.
Definition at line 169 of file IOStream_Device.cpp.
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
Read character from device.
Reimplemented in FAT16::File, CFFS::File, Soft::UART, UART, IOBuffer< SIZE >, and Socket.
Definition at line 112 of file IOStream_Device.cpp.
|
virtualinherited |
Read string terminated by new-line or until size into given string buffer. Returns pointer to string or NULL if empty line.
[in] | s | string buffer to read into. |
[in] | count | max number of bytes to read. |
Definition at line 118 of file IOStream_Device.cpp.
|
inlineinherited |
|
inlineinherited |
Set non-blocking mode.
Definition at line 77 of file IOStream.hh.
|
virtualinherited |
Peek at the next character from device.
Reimplemented in Soft::UART, UART, and IOBuffer< SIZE >.
Definition at line 99 of file IOStream_Device.cpp.
|
virtualinherited |
Peek for the given character in device buffer. Return number of characters or EOF(-1).
[in] | c | character to peek for. |
Reimplemented in Soft::UART, UART, and IOBuffer< SIZE >.
Definition at line 105 of file IOStream_Device.cpp.
|
virtual |
Write character to display. Handles carriage-return-line-feed, back- space, alert, horizontal tab and form-feed. Returns character or EOF on error.
[in] | c | character to write. |
Reimplemented from IOStream::Device.
|
virtualinherited |
Write null terminated string to device. Terminating null is not written.
[in] | s | string to write. |
Definition at line 43 of file IOStream_Device.cpp.
|
virtualinherited |
Write null terminated string from program memory to device. Terminating null is not written.
[in] | s | string in program memory to write. |
Definition at line 54 of file IOStream_Device.cpp.
|
virtualinherited |
Read data to given buffer with given size from device.
[in] | buf | buffer to read into. |
[in] | size | number of bytes to read. |
Reimplemented in FAT16::File, W5200::Driver, W5500::Driver, W5100::Driver, CFFS::File, Socket, and CC3000::Driver.
Definition at line 144 of file IOStream_Device.cpp.
|
virtualinherited |
Read data to given buffers in null terminated io vector.
[in] | vec | io vector with buffers to read into. |
Definition at line 157 of file IOStream_Device.cpp.
|
virtualinherited |
Number of bytes room (write without blocking).
Reimplemented in W5200::Driver, W5500::Driver, W5100::Driver, UART, IOBuffer< SIZE >, CC3000::Driver, and WIO.
Definition at line 30 of file IOStream_Device.cpp.
|
virtual |
|
inlineinherited |
|
virtual |
Write data from buffer with given size to device.
[in] | buf | buffer to write. |
[in] | size | number of bytes to write. |
Reimplemented from IOStream::Device.
|
virtualinherited |
Write data from buffers in null terminated io vector.
[in] | vec | io vector with buffers to write. |
Definition at line 87 of file IOStream_Device.cpp.
|
virtualinherited |
Write data from buffer in program memory with given size to device.
[in] | buf | buffer to write. |
[in] | size | number of bytes to write. |
Reimplemented in CFFS::File, Socket, and CC3000::Driver.
Definition at line 76 of file IOStream_Device.cpp.
|
protectedinherited |
Blocking state
Definition at line 248 of file IOStream.hh.
|
protectedinherited |
End of line mode
Definition at line 251 of file IOStream.hh.
|
protectedinherited |
|
protectedinherited |