ILI9341.h
Go to the documentation of this file.
1 /****
2  * ILI9341.h
3  *
4  * Copyright 2021 mikee47 <mike@sillyhouse.net>
5  *
6  * This file is part of the Sming-Graphics Library
7  *
8  * This library is free software: you can redistribute it and/or modify it under the terms of the
9  * GNU General Public License as published by the Free Software Foundation, version 3 or later.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with this library.
16  * If not, see <https://www.gnu.org/licenses/>.
17  *
18  * @author: May 2021 - mikee47 <mike@sillyhouse.net>
19  *
20  ****/
21 
22 #pragma once
23 
24 #include "../MipiDisplay.h"
25 
26 namespace Graphics
27 {
28 namespace Display
29 {
30 class ILI9341 : public MipiDisplay
31 {
32 public:
33  static constexpr Size resolution{240, 320};
34 
35  ILI9341(HSPI::Controller& spi, Size screenSize = resolution) : MipiDisplay(spi, resolution, screenSize)
36  {
38  }
39 
41 
42  /* Device */
43 
44  String getName() const override
45  {
46  return F("ILI9341");
47  }
48 
49 protected:
50  bool initialise() override;
51 };
52 
53 } // namespace Display
54 } // namespace Graphics
ILI9341(HSPI::Controller &spi, Size screenSize=resolution)
Definition: ILI9341.h:92
The String class.
Definition: WString.h:136
bool initialise() override
Perform display-specific initialisation.
Manages access to SPI hardware.
Definition: HardwareSPI/src/include/HSPI/Controller.h:71
static constexpr Size resolution
Definition: ILI9341.h:90
Definition: Virtual.h:30
@ DCS_ADDRESS_MODE_MIRROR_X
Definition: Mipi.h:196
MipiDisplay(HSPI::Controller &spi, Size resolution, Size screenSize)
Definition: MipiDisplay.h:49
String getName() const override
Get name of display.
Definition: ILI9341.h:101
#define F(string_literal)
Wrap a string literal stored in flash and access it using a String object.
Definition: WString.h:113
void setDefaultAddressMode(uint8_t mode)
Set default address mode setting.
Definition: MipiDisplay.h:186
Definition: Display.h:21