Software Reference Manual 10.0.2
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
Screen_EPD Class Referencefinal

Class for Pervasive Displays iTC screens. More...

#include <Screen_EPD.h>

Inheritance diagram for Screen_EPD:
[legend]
Collaboration diagram for Screen_EPD:
[legend]

Public Member Functions

 Screen_EPD (Driver_EPD_Virtual *driver)
 Constructor with default pins.
void begin ()
 Initialisation.
void clear (uint16_t colour=myColours.white)
 Clear the screen.
void flush ()
 Update the display, normal update.
void flushFast ()
 Update the display, fast update.
void regenerate (uint8_t mode=UPDATE_NORMAL)
 Regenerate the panel.
void setPowerProfile (uint8_t mode=POWER_MODE_AUTO, uint8_t scope=POWER_SCOPE_GPIO_ONLY)
 Set the power profile.
void suspend (uint8_t suspendScope=POWER_SCOPE_GPIO_ONLY)
 Suspend.
void resume ()
 Resume after suspend().
void setPanelPowerPin (uint8_t panelPowerPin=NOT_CONNECTED)
 Set panelPower pin.
void setTemperatureC (int8_t temperatureC=25)
 Set temperature in Celsius.
void setTemperatureF (int16_t temperatureF=77)
 Set temperature in Fahrenheit.
uint8_t checkTemperatureMode (uint8_t updateMode)
 Check the mode against the temperature.
virtual STRING_TYPE WhoAmI ()
 Who Am I.
virtual STRING_CONST_TYPE reference ()
 Library reference.
uint8_t screenColours ()
 Get number of colours.
virtual STRING_TYPE screenNumber ()
 Screen number.
void debugVariant (uint8_t contextFilm)
 Recommend variant for film.
Public Member Functions inherited from hV_Screen_Buffer
 hV_Screen_Buffer ()
 Constructor.
virtual void setOrientation (uint8_t orientation)
 Set orientation.
uint8_t getOrientation ()
 Get orientation.
virtual uint16_t screenSizeX ()
 Screen size, x-axis of logical screen.
virtual uint16_t screenSizeY ()
 Screen size, y-axis of logical screen.
virtual uint16_t screenDiagonal ()
 Screen size, diagonal.
virtual uint8_t screenColourBits ()
 Screen colour depth.
virtual void circle (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t colour)
 Draw circle.
virtual void line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour)
 Draw line, rectangle coordinates.
virtual void dLine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour)
 Draw line, vector coordinates.
virtual void setPenSolid (bool flag=true)
 Set pen opaque.
virtual void triangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t colour)
 Draw triangle, rectangle coordinates.
virtual void rectangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour)
 Draw rectangle, rectangle coordinates.
virtual void dRectangle (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour)
 Draw rectangle, vector coordinates.
virtual void point (uint16_t x1, uint16_t y1, uint16_t colour)
 Draw pixel.
virtual void selectFont (uint8_t fontIndex)
 Select font.
virtual uint8_t getFont ()
 Get font index.
virtual uint8_t addFont (font_s fontName)
 Add a font.
virtual void setFontSolid (bool flag=true)
 Set transparent or opaque text.
virtual void setFontSpaceX (uint8_t number=1)
 Set additional spaces between two characters, horizontal axis.
virtual void setFontSpaceY (uint8_t number=1)
 Set additional spaces between two characters, vertical axis.
virtual uint16_t characterSizeX (STRING_CONST_TYPE character)
 Character size, x-axis.
uint16_t characterSizeX (uint16_t character=0x00)
 Character size, x-axis.
virtual uint16_t characterSizeY ()
 Character size, y-axis.
virtual uint16_t stringSizeX (STRING_CONST_TYPE text8)
 String size, x-axis.
virtual uint16_t stringSizeX (STRING16_CONST_TYPE text16)
 String size, x-axis.
virtual uint8_t stringLengthToFitX (STRING_CONST_TYPE text8, uint16_t pixels)
 Number of characters to fit a size, x-axis.
virtual uint8_t stringLengthToFitX (STRING16_CONST_TYPE text16, uint16_t pixels)
 Number of characters to fit a size, x-axis.
virtual uint8_t fontMax ()
 Number of fonts.
virtual void gText (uint16_t x0, uint16_t y0, STRING_CONST_TYPE text, uint16_t textColour=myColours.black, uint16_t backColour=myColours.white)
 Draw UTF-8 coded text (pixel coordinates).
virtual void gText (uint16_t x0, uint16_t y0, STRING16_CONST_TYPE text, uint16_t textColour=myColours.black, uint16_t backColour=myColours.white)
 Select font.
virtual void gTextLarge (uint16_t x0, uint16_t y0, STRING_CONST_TYPE text, uint16_t textColour=myColours.black, uint16_t backColour=myColours.white)
 Draw UTF-16 coded text (pixel coordinates).
virtual void gTextLarge (uint16_t x0, uint16_t y0, STRING16_CONST_TYPE text, uint16_t textColour=myColours.black, uint16_t backColour=myColours.white)
 Select font.
bool isTouch ()
 Is touch available?
bool isTouchEvent ()
 Are touch events available?
bool getTouch (touch_t &touch)
 Poll touch.
void clearTouch ()
 Clear touch.
bool getTouchInterrupt ()
 Check touch interrupt.
void calibrateTouch ()
 Calibrate the touch.

Detailed Description

Class for Pervasive Displays iTC screens.

Screen controllers

  • LCD: Proprietary, SPI
  • Touch: Proprietary, I2C
  • Fonts: No external Flash
Note
All commands work on the frame-buffer, to be displayed on screen with flush()

Constructor & Destructor Documentation

◆ Screen_EPD()

Screen_EPD::Screen_EPD ( Driver_EPD_Virtual * driver)

Constructor with default pins.

Parameters
driver&driver to link Screen_EPD to
Note
Frame-buffer generated by the class
To be used with begin() with no parameter

Member Function Documentation

◆ begin()

void Screen_EPD::begin ( )
virtual

Initialisation.

Note
Frame-buffer generated internally, not suitable for FRAM
Warning
begin() initialises GPIOs and reads OTP

Reimplemented from hV_Screen_Buffer.

◆ checkTemperatureMode()

uint8_t Screen_EPD::checkTemperatureMode ( uint8_t updateMode)

Check the mode against the temperature.

Parameters
updateModeexpected update mode
Returns
uint8_t recommended mode
Note
If required, defaulting to UPDATE_NORMAL or UPDATE_NONE
Warning
Default temperature is 25 °C, otherwise set by setTemperatureC() or setTemperatureF()

◆ clear()

void Screen_EPD::clear ( uint16_t colour = myColours.white)
virtual

Clear the screen.

Parameters
colourdefault = white
Note
Clear next frame-buffer

Reimplemented from hV_Screen_Buffer.

◆ debugVariant()

void Screen_EPD::debugVariant ( uint8_t contextFilm)

Recommend variant for film.

Parameters
uint8_tContext film
Note
exit() called after

◆ flush()

void Screen_EPD::flush ( )
virtual

Update the display, normal update.

Note
  1. Send the frame-buffer to the screen
  2. Refresh the screen
Warning
When normal update not available, proxy for fast update

Implements hV_Screen_Buffer.

◆ flushFast()

void Screen_EPD::flushFast ( )

Update the display, fast update.

Note
  1. Send the frame-buffer to the screen
  2. Refresh the screen
  3. Copy next frame-buffer into old frame-buffer
Warning
When fast update not available, proxy for normal update

◆ reference()

virtual STRING_CONST_TYPE Screen_EPD::reference ( )
virtual

Library reference.

Returns
STRING_CONST_TYPE scope and release number
Note
Example Advanced v9.0.0

◆ regenerate()

void Screen_EPD::regenerate ( uint8_t mode = UPDATE_NORMAL)

Regenerate the panel.

White-to-black-to-white cycle to reduce ghosting

Parameters
modedefault = UPDATE_NORMAL = normal mode

◆ resume()

void Screen_EPD::resume ( )

Resume after suspend().

Turn SPI on and set all GPIOs levels

Note
Advanced edition only

◆ screenColours()

uint8_t Screen_EPD::screenColours ( )

Get number of colours.

Returns
uint8_t number of colours
  • 2 = monochrome
  • 3 = black-white-red or black-white-yellow
  • 4 = black-white-red-yellow

◆ screenNumber()

virtual STRING_TYPE Screen_EPD::screenNumber ( )
virtual

Screen number.

Returns
Screen number as string
Note
Example 266-KS-0C

◆ setPanelPowerPin()

void Screen_EPD::setPanelPowerPin ( uint8_t panelPowerPin = NOT_CONNECTED)

Set panelPower pin.

Parameters
panelPowerPinpanelPower pin
Note
EXT4 requires panelPower
If flashCS defined with panelPowerPin, then flashCS set to NOT_CONNECTED
Warning
setPanelPowerPin() should be called before begin()

◆ setPowerProfile()

void Screen_EPD::setPowerProfile ( uint8_t mode = POWER_MODE_AUTO,
uint8_t scope = POWER_SCOPE_GPIO_ONLY )

Set the power profile.

Parameters
modedefault = POWER_MODE_AUTO, otherwise POWER_MODE_MANUAL
scopedefault = POWER_SCOPE_GPIO_ONLY, otherwise POWER_SCOPE_GPIO_BUS, POWER_SCOPE_NONE
Note
If panelPower is NOT_CONNECTED, (POWER_MODE_AUTO, POWER_SCOPE_GPIO_ONLY) defaults to (POWER_MODE_MANUAL, POWER_SCOPE_NONE)
Call suspend(POWER_SCOPE_GPIO_BUS) manually
Advanced edition only

◆ setTemperatureC()

void Screen_EPD::setTemperatureC ( int8_t temperatureC = 25)

Set temperature in Celsius.

Set the temperature for update

Parameters
temperatureCtemperature in °C, default = 25 °C
Note
Refer to data-sheets for authorised operating temperatures

◆ setTemperatureF()

void Screen_EPD::setTemperatureF ( int16_t temperatureF = 77)

Set temperature in Fahrenheit.

Set the temperature for update

Parameters
temperatureFtemperature in °F, default = 77 °F = 25 °C
Note
Refer to data-sheets for authorised operating temperatures

◆ suspend()

void Screen_EPD::suspend ( uint8_t suspendScope = POWER_SCOPE_GPIO_ONLY)

Suspend.

Parameters
businclude SPI bus, default = POWER_SCOPE_GPIO_ONLY, otherwise POWER_SCOPE_BUS_GPIO or POWER_SCOPE_NONE

Power off and set all GPIOs low, POWER_SCOPE_BUS_GPIO also turns SPI off

Note
If panelPower is NOT_CONNECTED, POWER_SCOPE_GPIO_ONLY defaults to POWER_SCOPE_NONE
Advanced edition only

◆ WhoAmI()

virtual STRING_TYPE Screen_EPD::WhoAmI ( )
virtual

Who Am I.

Returns
Who Am I string

Implements hV_Screen_Buffer.


The documentation for this class was generated from the following file: