1765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang/* 2765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * Author: Yevgeniy Kiveisha <yevgeniy.kiveisha@intel.com> 3765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * Copyright (c) 2014 Intel Corporation. 4765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * 5765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * Permission is hereby granted, free of charge, to any person obtaining 6765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * a copy of this software and associated documentation files (the 7765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * "Software"), to deal in the Software without restriction, including 8765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * without limitation the rights to use, copy, modify, merge, publish, 9765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * distribute, sublicense, and/or sell copies of the Software, and to 10765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * permit persons to whom the Software is furnished to do so, subject to 11765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * the following conditions: 12765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * 13765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * The above copyright notice and this permission notice shall be 14765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * included in all copies or substantial portions of the Software. 15765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * 16765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang */ 24765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang#pragma once 25765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang 26765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang#include <string> 27765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang#include <mraa.h> 28765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang#include <mraa/types.hpp> 29765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang 30765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhangnamespace upm 31765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang{ 32765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang/** 33765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * @brief I2C LCD Display library 34765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * @defgroup i2clcd libupm-i2clcd 35765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang * @ingroup seeed sparkfun adafruit i2c gpio display gsk 36765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang */ 37765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhangclass LCD 38765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang{ 39765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang public: 40765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang LCD(); 41765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang virtual ~LCD(); 42765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang mraa::Result write(int x, int y, std::string msg); 43765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang 44765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang virtual mraa::Result write(std::string msg) = 0; 45765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang virtual mraa::Result setCursor(int row, int column) = 0; 46765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang virtual mraa::Result clear() = 0; 47765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang virtual mraa::Result home() = 0; 48765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang 49765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang std::string name(); 50765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang 51765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang protected: 52765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang std::string m_name; 53765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang}; 54765adb95dc941c32690d6c43bc08b9d07d197fcbJianxun Zhang} 55