Arduino-LCD
LCD library for Arduino
LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN > Class Template Reference

#include <SR3W.h>

Inheritance diagram for LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >:
Inheritance graph
Collaboration diagram for LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >:
Collaboration graph

Classes

union  port_t
 

Public Member Functions

 SR3W ()
 
virtual bool setup ()
 
virtual void write4b (uint8_t data)
 
virtual void write8b (uint8_t data)
 
virtual void set_mode (uint8_t flag)
 
virtual void set_backlight (uint8_t flag)
 
virtual void write8n (const void *buf, size_t size)
 

Protected Attributes

port_t m_port
 Port setting. More...
 
GPIO< SDA_PIN > m_sda
 Serial data output. More...
 
GPIO< SCL_PIN > m_scl
 Serial clock. More...
 
GPIO< EN_PIN > m_en
 Starts data read/write. More...
 

Static Protected Attributes

static const uint16_t SHORT_EXEC_TIME = 32
 

Detailed Description

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
class LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >

Definition at line 77 of file SR3W.h.

Constructor & Destructor Documentation

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::SR3W ( )
inline

Construct HD44780 3-wire serial adapter and initiate pins.

Definition at line 82 of file SR3W.h.

Member Function Documentation

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
virtual void LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::set_backlight ( uint8_t  flag)
inlinevirtual

Set backlight on/off using bt pin.

Parameters
[in]flag.

Implements HD44780::Adapter.

Definition at line 149 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
virtual void LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::set_mode ( uint8_t  flag)
inlinevirtual

Set instruction/data mode using given rs pin; zero for instruction, non-zero for data mode.

Parameters
[in]flag.

Implements HD44780::Adapter.

Definition at line 139 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
virtual bool LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::setup ( )
inlinevirtual

Use 4-bit mode. Returns false.

Returns
bool.

Reimplemented from HD44780::Adapter.

Definition at line 96 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
virtual void LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::write4b ( uint8_t  data)
inlinevirtual

Write 4-bit data to display using shift register.

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

Implements HD44780::Adapter.

Definition at line 106 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
virtual void LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::write8b ( uint8_t  data)
inlinevirtual

Write byte (8bit) to display.

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

Reimplemented from HD44780::Adapter.

Definition at line 126 of file SR3W.h.

virtual void HD44780::Adapter::write8n ( const void *  buf,
size_t  size 
)
inlinevirtualinherited

Write character/command buffer to display.

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

Reimplemented in LCD::DFRobot_IIC, and LCD::MJKDZ.

Definition at line 77 of file HD44780.h.

Member Data Documentation

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
GPIO<EN_PIN> LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::m_en
protected

Starts data read/write.

Definition at line 175 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
port_t LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::m_port
protected

Port setting.

Definition at line 172 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
GPIO<SCL_PIN> LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::m_scl
protected

Serial clock.

Definition at line 174 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
GPIO<SDA_PIN> LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::m_sda
protected

Serial data output.

Definition at line 173 of file SR3W.h.

template<BOARD::pin_t SDA_PIN, BOARD::pin_t SCL_PIN, BOARD::pin_t EN_PIN>
const uint16_t LCD::SR3W< SDA_PIN, SCL_PIN, EN_PIN >::SHORT_EXEC_TIME = 32
staticprotected

Execution time delay (us).

Definition at line 156 of file SR3W.h.


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