#include <MipiDisplay.h>
Public Member Functions | |
MipiDisplay (HSPI::Controller &spi, Size resolution, Size screenSize) | |
bool | begin (HSPI::PinSet pinSet, uint8_t chipSelect, uint8_t dcPin, uint8_t resetPin=PIN_NONE, uint32_t clockSpeed=4000000) |
uint32_t | readRegister (uint8_t cmd, uint8_t byteCount) |
uint32_t | readDisplayId () |
uint32_t | readDisplayStatus () |
uint8_t | readPowerMode () |
uint8_t | readMADCTL () |
uint8_t | readPixelFormat () |
uint8_t | readImageFormat () |
uint8_t | readSignalMode () |
uint8_t | readSelfDiag () |
void | setNativeSize (Size screenSize) |
Sets the screen size. Must be called before calling begin() More... | |
Size | getNativeSize () const override |
Get physical size of display. More... | |
Size | getResolution () const |
bool | setScrollMargins (uint16_t top, uint16_t bottom) override |
Set margins for hardware scrolling. More... | |
bool | scroll (int16_t y) override |
Scroll region of display up or down using hardware scrolling. More... | |
bool | setOrientation (Orientation orientation) override |
Set display orientation. More... | |
Size | getSize () const override |
Get target dimensions. More... | |
PixelFormat | getPixelFormat () const override |
All surfaces support the same pixel format. More... | |
Point | getAddrOffset () const |
Surface * | createSurface (size_t bufferSize=0) override |
Create a surface for use with this render target. More... | |
uint16_t | getScrollOffset () const |
SpiDisplay (HSPI::Controller &spi) | |
![]() | |
SpiDisplay (HSPI::Controller &spi) | |
bool | begin (HSPI::PinSet pinSet, uint8_t chipSelect, uint8_t resetPin=PIN_NONE, uint32_t clockSpeed=4000000) |
void | execute (SpiDisplayList &list, DisplayList::Callback callback=nullptr, void *param=nullptr) |
void | execute (const SpiDisplayList::Commands &commands, const FSTR::ObjectBase &data) |
void | reset (bool state) |
HSPI::IoModes | getSupportedIoModes () const override |
Return set of IO modes supported by a device implementation. More... | |
AddressWindow & | getAddressWindow () |
![]() | |
virtual | ~AbstractDisplay () |
![]() | |
virtual | ~Device () |
virtual String | getName () const =0 |
Get name of display. More... | |
Orientation | getOrientation () |
Get current display orientation. More... | |
![]() | |
virtual | ~RenderTarget () |
PackedColor | getColor (Color color) const |
Static Public Attributes | |
static const SpiDisplayList::Commands | commands |
Protected Member Functions | |
virtual bool | initialise ()=0 |
Perform display-specific initialisation. More... | |
void | sendInitData (const FSTR::ObjectBase &data) |
Called by implementation to send fixed initialisation sequences. More... | |
void | setDefaultAddressMode (uint8_t mode) |
Set default address mode setting. More... | |
![]() | |
void | transferStarting (Request &request) |
bool | transferComplete (Request &request) |
Device (Controller &controller) | |
virtual | ~Device () |
bool | begin (PinSet pinSet, uint8_t chipSelect, uint32_t clockSpeed) |
Register device with controller and prepare for action. More... | |
void | end () |
bool | isReady () const |
Determine if the device is initialised. More... | |
PinSet | getPinSet () const |
uint8_t | getChipSelect () const |
uint32_t | getSpeed () const |
void | setBitOrder (BitOrder bitOrder) |
BitOrder | getBitOrder () const |
void | setClockMode (ClockMode mode) |
ClockMode | getClockMode () const |
bool | isSupported (IoMode mode) const |
Determine if the device/controller combination supports an IO mode Must be called after begin() as other settings (e.g. pinset) can affect support. More... | |
virtual bool | setIoMode (IoMode mode) |
IoMode | getIoMode () const |
size_t | getBitsPerClock () const |
void | execute (Request &request) |
void | onTransfer (Callback callback) |
Set a callback to be invoked before a request is started, and when it has finished. More... | |
void | wait (Request &request) |
![]() | |
virtual | ~AbstractDisplay () |
![]() | |
virtual | ~Device () |
virtual String | getName () const =0 |
Get name of display. More... | |
Orientation | getOrientation () |
Get current display orientation. More... | |
![]() | |
virtual | ~RenderTarget () |
PackedColor | getColor (Color color) const |
Protected Attributes | |
Size | resolution {} |
Controller resolution. More... | |
Size | nativeSize {} |
Size of attached screen. More... | |
Point | addrOffset {} |
Display orientation may require adjustment to address window position. More... | |
uint8_t | defaultAddressMode {Mipi::DCS_ADDRESS_MODE_BGR} |
![]() | |
uint8_t | resetPin {PIN_NONE} |
AddressWindow | addrWindow {} |
![]() | |
friend | Controller |
Controller & | controller |
![]() | |
Orientation | orientation {} |
Constructor & Destructor Documentation
◆ MipiDisplay()
|
inline |
Member Function Documentation
◆ begin()
bool Graphics::MipiDisplay::begin | ( | HSPI::PinSet | pinSet, |
uint8_t | chipSelect, | ||
uint8_t | dcPin, | ||
uint8_t | resetPin = PIN_NONE , |
||
uint32_t | clockSpeed = 4000000 |
||
) |
◆ createSurface()
Create a surface for use with this render target.
- Parameters
-
bufferSize Size of internal command/data buffer
- Return values
-
Surface* The surface to use
Caller is responsible for destroying the surface when no longer required.
Implements Graphics::RenderTarget.
◆ getAddrOffset()
|
inline |
◆ getNativeSize()
|
inlineoverridevirtual |
Get physical size of display.
- Return values
-
Size Dimensions for NORMAL orientation
Implements Graphics::Device.
◆ getPixelFormat()
|
inlineoverridevirtual |
All surfaces support the same pixel format.
Implements Graphics::RenderTarget.
◆ getResolution()
|
inline |
◆ getScrollOffset()
|
inline |
◆ getSize()
|
inlineoverridevirtual |
Get target dimensions.
Implements Graphics::RenderTarget.
◆ initialise()
|
protectedpure virtual |
Perform display-specific initialisation.
- Return values
-
bool true on success, false on failure
Implemented in Graphics::Display::ILI9341, and Graphics::Display::ST7789V.
◆ readDisplayId()
|
inline |
◆ readDisplayStatus()
|
inline |
◆ readImageFormat()
|
inline |
◆ readMADCTL()
|
inline |
◆ readPixelFormat()
|
inline |
◆ readPowerMode()
|
inline |
◆ readRegister()
◆ readSelfDiag()
|
inline |
◆ readSignalMode()
|
inline |
◆ scroll()
|
overridevirtual |
Scroll region of display up or down using hardware scrolling.
- Parameters
-
y Number of lines to scroll. Positive values scroll content down, negative values scroll up.
Implements Graphics::Device.
◆ sendInitData()
|
inlineprotected |
Called by implementation to send fixed initialisation sequences.
◆ setDefaultAddressMode()
|
inlineprotected |
Set default address mode setting.
The display may be attached to the controller in various ways, resulting in a flipped or rotated display.
Changing the default mode allows this to be corrected.
For example, if the display is flipped horizontally, use:
setDefaultAddressMode(Graphics::Mipi::DCS_ADDRESS_MODE_MIRROR_X);
Flag values may be combined, for example:
setDefaultAddressMode( Graphics::Mipi::DCS_ADDRESS_MODE_MIRROR_X | Graphics::Mipi::DCS_ADDRESS_MODE_MIRROR_Y );
◆ setNativeSize()
|
inline |
Sets the screen size. Must be called before calling begin()
◆ setOrientation()
|
overridevirtual |
Set display orientation.
Implements Graphics::Device.
◆ setScrollMargins()
Set margins for hardware scrolling.
- Parameters
-
top Number of fixed pixels at top of screen bottom Number of fixed pixels at bottom of screen
Area between top/bottom can be scrolled using scroll()
method.
Implements Graphics::Device.
◆ SpiDisplay()
|
inline |
Member Data Documentation
◆ addrOffset
|
protected |
Display orientation may require adjustment to address window position.
◆ commands
|
static |
◆ defaultAddressMode
|
protected |
◆ nativeSize
◆ resolution
|
protected |
Controller resolution.
The documentation for this class was generated from the following file: