Pervasive Displays Library Suite - Reference Manual 9.0.3
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:
Collaboration diagram for Screen_EPD:

Public Member Functions

void clear (uint16_t colour=myColours.white)
 Clear the screen.
 
void flush ()
 Update the display, normal update.
 
void flushFast ()
 Update the display, fast update.
 
uint8_t flushMode (uint8_t updateMode=UPDATE_FAST)
 Update the display.
 
void regenerate (uint8_t mode=UPDATE_FAST)
 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 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.
 
pins_t getBoardPins ()
 Get the pins of the board.
 
Option 1: frame-buffer managed inside the class
  • Could be internal MCU or external SPI SRAM
  • Not suitable for FRAM
  • Not suitable for GUI
 Screen_EPD (Driver_EPD_Virtual *driver)
 Constructor with default pins.
 
void begin ()
 Initialisation.
 
Option 2: frame-buffer managed outside the class
  • Required for FRAM with PLACE_IN_FRAM
  • Required for PSRAM
  • Not suitable for external SPI
  • Highly recommended for GUI
    Note
    Advanced edition only
 Screen_EPD (Driver_EPD_Virtual *driver, uint8_t *frameBuffer)
 Constructor with default pins.
 
- Public Member Functions inherited from hV_Screen_Buffer
 hV_Screen_Buffer ()
 Constructor.
 
font_s getFontDetails ()
 Get the details of the selected font.
 
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 setMarginXY (uint16_t marginX=0, uint16_t marginY=0)
 Set margin for logical screen.
 
virtual uint16_t screenMarginX ()
 Margin size, x-axis of logical screen.
 
virtual uint16_t screenMarginY ()
 Magin size, y-axis of logical screen.
 
virtual void circle (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t colour)
 Draw circle.
 
virtual void arc (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t start, uint16_t end, uint16_t colour)
 Draw arc.
 
virtual void level (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t start, uint16_t end, uint16_t colour)
 Draw level in a circle.
 
virtual void ring (uint16_t x0, uint16_t y0, uint16_t inner, uint16_t outer, uint16_t colour)
 Draw ring.
 
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 bool getPenSolid ()
 Get pen mode.
 
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 roundedRectangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t radius, uint16_t colour)
 Draw rectangle, rectangle coordinates.
 
virtual void dRoundedRectangle (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t radius, uint16_t colour)
 Draw rounded rectangle, vector coordinates.
 
virtual void point (uint16_t x1, uint16_t y1, uint16_t colour)
 Draw pixel.
 
uint16_t readPixel (uint16_t x1, uint16_t y1)
 Read pixel colour.
 
virtual bool isArea ()
 Is area available?
 
virtual void openArea (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy)
 Open an area for fast sequential writing, vector coordinates.
 
virtual void feedArea (uint16_t colour)
 Feed the area with colour.
 
virtual void closeArea ()
 Close the area previously opened.
 
virtual void selectFont (uint8_t font)
 Select font number.
 
virtual uint8_t getFont ()
 Get font number.
 
virtual uint8_t addFont (font_s fontName)
 Add a font.
 
virtual void setFontSolid (bool flag=true)
 Set transparent or opaque text.
 
virtual bool getFontSolid ()
 Get text mode.
 
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 (uint8_t character=0x00)
 Character size, x-axis.
 
virtual uint16_t characterSizeY ()
 Character size, y-axis.
 
virtual uint16_t stringSizeX (STRING_CONST_TYPE text)
 String size, x-axis.
 
virtual uint8_t stringLengthToFitX (STRING_CONST_TYPE text, 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 ASCII Text (pixel coordinates)
 
bool isEnergy ()
 Does the screen provide energy features?
 
bool isIntensity ()
 Is screen backlight variable?
 
void setBacklight (bool state)
 Turn display backlight on or off.
 
void setIntensity (uint8_t intensity)
 Set backlight intensity.
 
uint8_t getIntensity ()
 Get display backlight intensity.
 
void setEnergy (uint32_t seconds=6)
 Set delay for power saving.
 
void updateEnergy (bool state)
 Update power saving.
 
bool isReadable ()
 Is screen readable?
 
bool isStorage ()
 Does the screen feature an external storage?
 
void copyPasteArea (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t dx, uint16_t dy)
 Copy a source area to a target area.
 
virtual void copyArea (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint32_t &address)
 Copy an area to an external support.
 
virtual void pasteArea (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint32_t &address, bool option=false)
 Paste an area from an external support.
 
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.
 
- Public Member Functions inherited from hV_Screen_Virtual
 hV_Screen_Virtual ()=default
 Constructor.
 
 ~hV_Screen_Virtual ()=default
 Destructor.
 

Friends

class Serial_Buffer
 
class Serial_Image
 
class Serial_Image16
 
class Serial_P4
 
class File_BMP
 
class File_Buffer
 
class File_Frame
 
class File_Image
 
class File_Image16
 
class File_P4
 
class File_PBM
 

Detailed Description

Class for Pervasive Displays iTC screens.

Screen controllers

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

Constructor & Destructor Documentation

◆ Screen_EPD() [1/2]

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

◆ Screen_EPD() [2/2]

Screen_EPD::Screen_EPD ( Driver_EPD_Virtual * driver,
uint8_t * frameBuffer )

Constructor with default pins.

Parameters
driver&driver to link Screen_EPD to
frameBufferexternal frame-buffer
Note
Take the greatest frame-buffer size, with size and model of the e-screen changed later on at begin(eScreen_EPD_t)
External frame-buffer required for
Advanced edition only

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

◆ flushMode()

uint8_t Screen_EPD::flushMode ( uint8_t updateMode = UPDATE_FAST)

Update the display.

Display next frame-buffer on screen and copy next frame-buffer into old frame-buffer

Parameters
updateModeexpected update mode, default = UPDATE_FAST
Returns
uint8_t recommended mode
Note
Mode checked with checkTemperatureMode()
Advanced edition only

◆ getBoardPins()

pins_t Screen_EPD::getBoardPins ( )

Get the pins of the board.

Returns
pins_t pins of the board
Note
Advanced edition only

◆ 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_FAST)

Regenerate the panel.

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

Parameters
modedefault = UPDATE_FAST = fast mode, otherwise 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

◆ 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: