diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-03-25 00:57:28 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-03-25 00:57:28 +0800 |
commit | 8e57c683d3d16f1dee320f10c411602ea38ba651 (patch) | |
tree | 75df3040d13c3f1850d93e29eb93a3836cae133c /samples/dashboard_1602/LCD4Bit_mod.h | |
download | 2021-arduino-obd-8e57c683d3d16f1dee320f10c411602ea38ba651.tar.gz 2021-arduino-obd-8e57c683d3d16f1dee320f10c411602ea38ba651.tar.bz2 2021-arduino-obd-8e57c683d3d16f1dee320f10c411602ea38ba651.zip |
initial commit
Diffstat (limited to 'samples/dashboard_1602/LCD4Bit_mod.h')
-rw-r--r-- | samples/dashboard_1602/LCD4Bit_mod.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/samples/dashboard_1602/LCD4Bit_mod.h b/samples/dashboard_1602/LCD4Bit_mod.h new file mode 100644 index 0000000..7318c32 --- /dev/null +++ b/samples/dashboard_1602/LCD4Bit_mod.h @@ -0,0 +1,27 @@ +#ifndef LCD4Bit_mod_h +#define LCD4Bit_mod_h + +#include <inttypes.h> + +class LCD4Bit_mod { +public: + LCD4Bit_mod(int num_lines); + void commandWrite(int value); + void init(); + void print(int value); + void printIn(const char* value); + void clear(); + //non-core--------------- + void cursorTo(int line_num, int x); + void leftScroll(int chars, int delay_time); + //end of non-core-------- + + //4bit only, therefore ideally private but may be needed by user + void commandWriteNibble(int nibble); +private: + void pulseEnablePin(); + void pushNibble(int nibble); + void pushByte(int value); +}; + +#endif |