Software Reference Manual 9.2.2
Library for Pervasive Displays e-paper screens, extension boards and development kits
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. More...
 
void begin ()
 Initialisation. More...
 
void clear (uint16_t colour=myColours.white)
 Clear the screen. More...
 
void flush ()
 Update the display, normal update. More...
 
void flushFast ()
 Update the display, fast update. More...
 
void regenerate (uint8_t mode=UPDATE_NORMAL)
 Regenerate the panel. More...
 
void setPowerProfile (uint8_t mode=POWER_MODE_AUTO, uint8_t scope=POWER_SCOPE_GPIO_ONLY)
 Set the power profile. More...
 
void suspend (uint8_t suspendScope=POWER_SCOPE_GPIO_ONLY)
 Suspend. More...
 
void resume ()
 Resume after suspend() More...
 
void setPanelPowerPin (uint8_t panelPowerPin=NOT_CONNECTED)
 Set panelPower pin. More...
 
void setTemperatureC (int8_t temperatureC=25)
 Set temperature in Celsius. More...
 
void setTemperatureF (int16_t temperatureF=77)
 Set temperature in Fahrenheit. More...
 
uint8_t checkTemperatureMode (uint8_t updateMode)
 Check the mode against the temperature. More...
 
virtual STRING_TYPE WhoAmI ()
 Who Am I. More...
 
virtual STRING_CONST_TYPE reference ()
 Library reference. More...
 
uint8_t screenColours ()
 Get number of colours. More...
 
virtual STRING_TYPE screenNumber ()
 Screen number. More...
 
void debugVariant (uint8_t contextFilm)
 Recommend variant for film. More...
 
- Public Member Functions inherited from hV_Screen_Buffer
 hV_Screen_Buffer ()
 Constructor.
 
virtual void setOrientation (uint8_t orientation)
 Set orientation. More...
 
uint8_t getOrientation ()
 Get orientation. More...
 
virtual uint16_t screenSizeX ()
 Screen size, x-axis of logical screen. More...
 
virtual uint16_t screenSizeY ()
 Screen size, y-axis of logical screen. More...
 
virtual uint16_t screenDiagonal ()
 Screen size, diagonal. More...
 
virtual uint8_t screenColourBits ()
 Screen colour depth. More...
 
virtual void circle (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t colour)
 Draw circle. More...
 
virtual void line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour)
 Draw line, rectangle coordinates. More...
 
virtual void dLine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour)
 Draw line, vector coordinates. More...
 
virtual void setPenSolid (bool flag=true)
 Set pen opaque. More...
 
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. More...
 
virtual void rectangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour)
 Draw rectangle, rectangle coordinates. More...
 
virtual void dRectangle (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour)
 Draw rectangle, vector coordinates. More...
 
virtual void point (uint16_t x1, uint16_t y1, uint16_t colour)
 Draw pixel. More...
 
virtual void selectFont (uint8_t font)
 Select font number. More...
 
virtual uint8_t getFont ()
 Get font number. More...
 
virtual uint8_t addFont (font_s fontName)
 Add a font. More...
 
virtual void setFontSolid (bool flag=true)
 Set transparent or opaque text. More...
 
virtual void setFontSpaceX (uint8_t number=1)
 Set additional spaces between two characters, horizontal axis. More...
 
virtual void setFontSpaceY (uint8_t number=1)
 Set additional spaces between two characters, vertical axis. More...
 
virtual uint16_t characterSizeX (uint8_t character=0x00)
 Character size, x-axis. More...
 
virtual uint16_t characterSizeY ()
 Character size, y-axis. More...
 
virtual uint16_t stringSizeX (STRING_CONST_TYPE text)
 String size, x-axis. More...
 
virtual uint8_t stringLengthToFitX (STRING_CONST_TYPE text, uint16_t pixels)
 Number of characters to fit a size, x-axis. More...
 
virtual uint8_t fontMax ()
 Number of fonts. More...
 
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) More...
 
virtual void gTextLarge (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) More...
 
bool isTouch ()
 Is touch available? More...
 
bool isTouchEvent ()
 Are touch events available? More...
 
bool getTouch (touch_t &touch)
 Poll touch. More...
 
void clearTouch ()
 Clear touch.
 
bool getTouchInterrupt ()
 Check touch interrupt. More...
 
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: