modm API documentation
st7036.hpp
1 /*
2  * Copyright (c) 2009, Thorsten Lajewski
3  * Copyright (c) 2009-2011, Fabian Greif
4  * Copyright (c) 2012-2014, Niklas Hauser
5  *
6  * This file is part of the modm project.
7  *
8  * This Source Code Form is subject to the terms of the Mozilla Public
9  * License, v. 2.0. If a copy of the MPL was not distributed with this
10  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11  */
12 // ----------------------------------------------------------------------------
13 
14 #ifndef MODM_ST7036_HPP
15 #define MODM_ST7036_HPP
16 
17 #include <modm/ui/display/character_display.hpp>
18 
19 namespace modm
20 {
21  /**
22  * \brief Driver for ST7036 based LC-displays
23  *
24  * \todo make this class adaptable to other line counts!
25  * \todo documentation
26  *
27  * Available defines:
28  * - ST7036_VOLTAGE = 3|5
29  *
30  * \see Lcd
31  *
32  * \author Fabian Greif
33  * \ingroup modm_driver_ea_dog
34  */
35  template <typename SPI, typename CS, typename RS, unsigned int Width, unsigned int Heigth>
36  class St7036 : public CharacterDisplay
37  {
38  public:
39  /// Constructor
40  St7036();
41 
42  /**
43  * \brief Initialize the display
44  *
45  * The display needs some time to initialize after startup. You have
46  * to wait at least 50 ms until calling this method.
47  */
48  virtual void
49  initialize();
50 
51  virtual void
52  writeRaw(char c);
53 
54  virtual void
55  execute(Command command);
56 
57  virtual void
58  setCursor(uint8_t column, uint8_t line);
59 
60  // TODO
61  //void
62  //setContrast();
63 
64  protected:
65  void
66  writeCommand(uint8_t command);
67  };
68 }
69 
70 #include "st7036_impl.hpp"
71 
72 #endif // MODM_ST7036_HPP
Command
Definition: character_display.hpp:41
virtual void setCursor(uint8_t column, uint8_t line)
virtual void writeRaw(char c)
virtual void initialize()
Initialize the display.
St7036()
Constructor.
Definition: character_display.hpp:38
Driver for ST7036 based LC-displays.
Definition: st7036.hpp:36