Arduino-LCD
LCD library for Arduino
LCD::DFRobot_IIC Class Reference

#include <DFRobot_IIC.h>

Inheritance diagram for LCD::DFRobot_IIC:
Inheritance graph
Collaboration diagram for LCD::DFRobot_IIC:
Collaboration graph

Classes

union  port_t
 

Public Member Functions

 DFRobot_IIC (TWI &twi, uint8_t subaddr=7)
 
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...
 

Detailed Description

Definition at line 48 of file DFRobot_IIC.h.

Constructor & Destructor Documentation

LCD::DFRobot_IIC::DFRobot_IIC ( TWI &  twi,
uint8_t  subaddr = 7 
)
inline

Construct HD44780 adapter when using the DFRobot I2C/TWI I/O expander with given sub-address (A0..A2).

Parameters
[in]subaddrsub-address (0..7, default 7).

Definition at line 55 of file DFRobot_IIC.h.

Member Function Documentation

virtual void LCD::DFRobot_IIC::set_backlight ( uint8_t  flag)
inlinevirtual

Set backlight on/off.

Parameters
[in]flag.

Implements HD44780::Adapter.

Definition at line 155 of file DFRobot_IIC.h.

virtual void LCD::DFRobot_IIC::set_mode ( uint8_t  flag)
inlinevirtual

Set instruction/data mode; zero for instruction, non-zero for data mode.

Parameters
[in]flag.

Implements HD44780::Adapter.

Definition at line 145 of file DFRobot_IIC.h.

virtual bool LCD::DFRobot_IIC::setup ( )
inlinevirtual

Initiate TWI interface. Returns false.

Returns
bool.

Reimplemented from HD44780::Adapter.

Definition at line 65 of file DFRobot_IIC.h.

virtual void LCD::DFRobot_IIC::write4b ( uint8_t  data)
inlinevirtual

Write nibble to display using TWI interface.

Parameters
[in]data(4b) to write.

Implements HD44780::Adapter.

Definition at line 76 of file DFRobot_IIC.h.

virtual void LCD::DFRobot_IIC::write8b ( uint8_t  data)
inlinevirtual

Write byte (8bit) to display.

Parameters
[in]data(8b) to write.

Reimplemented from HD44780::Adapter.

Definition at line 92 of file DFRobot_IIC.h.

virtual void LCD::DFRobot_IIC::write8n ( const void *  buf,
size_t  size 
)
inlinevirtual

Write character buffer to display.

Parameters
[in]bufpointer to buffer.
[in]sizenumber of bytes in buffer.

Reimplemented from HD44780::Adapter.

Definition at line 114 of file DFRobot_IIC.h.

Member Data Documentation

port_t LCD::DFRobot_IIC::m_port
protected

Port setting.

Definition at line 175 of file DFRobot_IIC.h.


The documentation for this class was generated from the following file: