COSA
An Object-Oriented Platform for Arduino Programming
|
#include <Adafruit_I2C_LCD_Backpack.hh>
Classes | |
union | port_t |
Public Member Functions | |
Adafruit_I2C_LCD_Backpack (uint8_t subaddr=0) | |
virtual bool | setup () |
virtual void | write4b (uint8_t data) |
virtual void | write8b (uint8_t data) |
virtual void | write8n (const void *buf, size_t size) |
virtual void | set_mode (uint8_t flag) |
virtual void | set_backlight (uint8_t flag) |
Protected Attributes | |
port_t | m_port |
Port setting. More... | |
Static Protected Attributes | |
static const uint8_t | TMP_MAX = 32 |
Private Types | |
enum | InterruptMode { DISABLE = 0, ON_CHANGE = 1, ON_FALLING = 2, ON_RISING = 3 } |
enum | { IODIR = 0x00, IPOL = 0x01, GPINTEN = 0x02, DEFVAL = 0x03, INTCON = 0x04, IOCON = 0x05, GPPU = 0x06, INTF = 0x07, INTCAP = 0x08, GPIO = 0x09, OLAT = 0x0a, REG_MAX = 0x0b } |
enum | { INTPOL = 1, ODR = 2, HAEN = 3, DISSLW = 4, SEQOP = 5 } |
Private Member Functions | |
bool | begin () |
bool | data_direction (uint8_t iodir) |
bool | pullup (uint8_t gppu) |
bool | input_pin (uint8_t pin) |
bool | pullup_pin (uint8_t pin) |
bool | interrupt_pin (uint8_t pin, InterruptMode mode) |
bool | output_pin (uint8_t pin) |
bool | read_pin (uint8_t pin) |
bool | write_pin (uint8_t pin, uint8_t value) |
uint8_t | read () |
bool | read (void *buf, size_t size) |
bool | write (uint8_t value) |
bool | write (void *buf, size_t size) |
Private Attributes | |
uint8_t | m_iodir |
uint8_t | m_gpinten |
uint8_t | m_defval |
uint8_t | m_intcon |
uint8_t | m_gppu |
uint8_t | m_olat |
uint8_t | m_reg |
Static Private Attributes | |
static const uint8_t | SUBADDR_MASK = 0x07 |
static const uint8_t | PIN_MASK = 0x07 |
IO handler for HD44780 (LCD-II) Dot Matix Liquid Crystal Display Controller/Driver when using the Adafruit I2C LCD Backpack with MCP23008 I2C IO expander device driver.
Definition at line 51 of file Adafruit_I2C_LCD_Backpack.hh.
|
inline |
Construct HD44780 IO port handler using the Adafruit I2C LCD Backpack with given sub-address (A0..A2).
[in] | subaddr | sub-address (0..7, default 0). |
Definition at line 58 of file Adafruit_I2C_LCD_Backpack.hh.
|
virtual |
Set backlight on/off.
[in] | flag. |
Implements HD44780::IO.
Definition at line 93 of file Adafruit_I2C_LCD_Backpack.cpp.
|
virtual |
Set instruction/data mode; zero for instruction, non-zero for data mode.
[in] | flag. |
Implements HD44780::IO.
Definition at line 87 of file Adafruit_I2C_LCD_Backpack.cpp.
|
virtual |
Initiate TWI interface. Returns false.
Implements HD44780::IO.
Definition at line 24 of file Adafruit_I2C_LCD_Backpack.cpp.
|
virtual |
Write nibble to display using TWI interface.
[in] | data | (4b) to write. |
Implements HD44780::IO.
Definition at line 32 of file Adafruit_I2C_LCD_Backpack.cpp.
|
virtual |
Write byte (8bit) to display.
[in] | data | (8b) to write. |
Reimplemented from HD44780::IO.
Definition at line 44 of file Adafruit_I2C_LCD_Backpack.cpp.
|
virtual |
Write character buffer to display.
[in] | buf | pointer to buffer. |
[in] | size | number of bytes in buffer. |
Reimplemented from HD44780::IO.
Definition at line 61 of file Adafruit_I2C_LCD_Backpack.cpp.
|
protected |
Port setting.
Definition at line 130 of file Adafruit_I2C_LCD_Backpack.hh.
|
staticprotected |
Max size of temporary buffer for TWI message.
Definition at line 109 of file Adafruit_I2C_LCD_Backpack.hh.