upm  0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
lcm1602.h
1 /*
2  * The MIT License (MIT)
3  *
4  * Author: Daniel Mosquera
5  * Copyright (c) 2013 Daniel Mosquera
6  *
7  * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
8  * Copyright (c) 2014 Intel Corporation.
9  *
10  * Permission is hereby granted, free of uint8_tge, to any person obtaining a copy of
11  * this software and associated documentation files (the "Software"), to deal in
12  * the Software without restriction, including without limitation the rights to
13  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
14  * the Software, and to permit persons to whom the Software is furnished to do so,
15  * subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in all
18  * copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
23  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26  */
27 
28 #pragma once
29 
30 #include <string>
31 #include "i2clcd.h"
32 
33 namespace upm
34 {
55 class Lcm1602 : public I2CLcd
56 {
57  public:
64  Lcm1602(int bus, int address);
68  ~Lcm1602();
76  mraa_result_t write(std::string msg);
84  mraa_result_t setCursor(int row, int column);
90  mraa_result_t clear();
96  mraa_result_t home();
97 
98  private:
99  mraa_result_t send(uint8_t value, int mode);
100  mraa_result_t write4bits(uint8_t value);
101  mraa_result_t expandWrite(uint8_t value);
102  mraa_result_t pulseEnable(uint8_t value);
103 };
104 }
~Lcm1602()
Definition: lcm1602.cxx:64
mraa_result_t write(std::string msg)
Definition: lcm1602.cxx:74
mraa_result_t setCursor(int row, int column)
Definition: lcm1602.cxx:84
Definition: a110x.h:29
Definition: i2clcd.h:83
mraa_result_t clear()
Definition: lcm1602.cxx:95
Lcm1602(int bus, int address)
Definition: lcm1602.cxx:35
mraa_result_t home()
Definition: lcm1602.cxx:101
C++ API for LCM1602 i2c controller for HD44780 based displays.
Definition: lcm1602.h:55