![]() |
LCD Library 1.2.0
LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.
|
00001 // --------------------------------------------------------------------------- 00002 // Created by Francisco Malpartida on 20/08/11. 00003 // Copyright 2011 - Under creative commons license 3.0: 00004 // Attribution-ShareAlike CC BY-SA 00005 // 00006 // This module is by Marc MERLIN <marc_soft<at>merlins.org> 00007 // See .cpp file for hardware details. 00008 // --------------------------------------------------------------------------- 00009 #ifndef _LIQUIDCRYSTAL_SR_LCD3_ 00010 #define _LIQUIDCRYSTAL_SR_LCD3_ 00011 00012 #include <inttypes.h> 00013 #include <LCD.h> 00014 #include <FastIO.h> 00015 00016 00017 class LiquidCrystal_SR_LCD3 : public LCD 00018 { 00019 public: 00031 LiquidCrystal_SR_LCD3 ( uint8_t srdata, uint8_t srclock, uint8_t enable ); 00032 00033 00046 virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS); 00047 00060 virtual void send(uint8_t value, uint8_t mode); 00061 00062 00063 private: 00064 00070 void init ( uint8_t srdata, uint8_t srclock, uint8_t enable, uint8_t lines, 00071 uint8_t font ); 00077 void write4bits ( uint8_t ); 00078 void _pushOut ( uint8_t ); 00079 00080 // Serial Data pin 00081 fio_bit _srdata_bit; 00082 fio_register _srdata_register; 00083 00084 // Clock Pin 00085 fio_bit _srclock_bit; 00086 fio_register _srclock_register; 00087 00088 // Enable Pin 00089 fio_bit _strobe_bit; 00090 fio_register _strobe_register; 00091 }; 00092 00093 #endif 00094
1.7.4