Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
SSD1608 E-Paper Display sensorif driver

Library for communicating with the SSD1608 E-Paper display driver. More...

Collaboration diagram for SSD1608 E-Paper Display sensorif driver:

Macros

#define SIF_SSD1608_BUSY_PIN   31
 
#define SIF_SSD1608_RST_PIN   15
 
#define SIF_SSD1608_DC_PIN   34
 
#define SIF_SSD1608_BUSY_TIMEOUT   4000
 
#define SIF_SSD1608_WIDTH_PHYSICAL   200
 
#define SIF_SSD1608_HEIGHT_PHYSICAL   200
 
#define SIF_SSD1608_WIDTH_WINDOW   192
 
#define SIF_SSD1608_HEIGHT_WINDOW   200
 
#define SIF_SSD1608_WIDTH   (SIF_SSD1608_WIDTH_WINDOW / 2)
 
#define SIF_SSD1608_HEIGHT   (SIF_SSD1608_WIDTH_WINDOW / 2)
 
#define ARRAY_SIZE   (SIF_SSD1608_HEIGHT * SIF_SSD1608_WIDTH / 8)
 
#define SIF_SSD1608_TUPDATE_PARTIAL   350
 
#define SIF_SSD1608_TUPDATE_FULL   1050
 

Enumerations

enum  SIF_SSD1608_Update_Mode { FULL_UPDATE = 0 , PARTIAL_UPDATE }
 
enum  SIF_SSD1608_Clear_Mode { WITH_CLEAR = 0 , WITHOUT_CLEAR }
 

Functions

ca_error SIF_SSD1608_Initialise (SIF_SSD1608_Update_Mode mode)
 EINK Initialisation. More...
 
void SIF_SSD1608_Deinitialise (void)
 EINK De-Initialisation. More...
 
void SIF_SSD1608_ClearDisplay (void)
 Clears the display. More...
 
void SIF_SSD1608_StrongClearDisplay (void)
 Clears the display many times to make sure there is no ghost image. More...
 
void SIF_SSD1608_DeepSleep (void)
 Enter deep sleep mode. More...
 
ca_error SIF_SSD1608_overlay_qr_code (const char *text, uint8_t *image, uint8_t scale, uint8_t x, uint8_t y)
 Creates a QR code and overlays it on top of a pre-existing image at the given coordinates. More...
 
void SIF_SSD1608_DisplayImage (const uint8_t *image, SIF_SSD1608_Clear_Mode mode, bool full_resolution)
 Follows Routines for clearing, waiting and displaying the image. More...
 
void SIF_SSD1608_DisplayImageNoWait (const uint8_t *image, SIF_SSD1608_Clear_Mode mode, bool full_resolution)
 Same as SIF_SSD1608_DisplayImage() but does not wait for busy. More...
 
ca_error SIF_SSD1608_PowerDown (void *aContext)
 callback function for power-down when not waiting for busy signal More...
 

Variables

bool sif_ssd1608_display_is_busy
 

Detailed Description

Library for communicating with the SSD1608 E-Paper display driver.

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE   (SIF_SSD1608_HEIGHT * SIF_SSD1608_WIDTH / 8)

◆ SIF_SSD1608_BUSY_PIN

#define SIF_SSD1608_BUSY_PIN   31

◆ SIF_SSD1608_BUSY_TIMEOUT

#define SIF_SSD1608_BUSY_TIMEOUT   4000

◆ SIF_SSD1608_DC_PIN

#define SIF_SSD1608_DC_PIN   34

◆ SIF_SSD1608_HEIGHT

#define SIF_SSD1608_HEIGHT   (SIF_SSD1608_WIDTH_WINDOW / 2)

◆ SIF_SSD1608_HEIGHT_PHYSICAL

#define SIF_SSD1608_HEIGHT_PHYSICAL   200

◆ SIF_SSD1608_HEIGHT_WINDOW

#define SIF_SSD1608_HEIGHT_WINDOW   200

◆ SIF_SSD1608_RST_PIN

#define SIF_SSD1608_RST_PIN   15

◆ SIF_SSD1608_TUPDATE_FULL

#define SIF_SSD1608_TUPDATE_FULL   1050

◆ SIF_SSD1608_TUPDATE_PARTIAL

#define SIF_SSD1608_TUPDATE_PARTIAL   350

◆ SIF_SSD1608_WIDTH

#define SIF_SSD1608_WIDTH   (SIF_SSD1608_WIDTH_WINDOW / 2)

◆ SIF_SSD1608_WIDTH_PHYSICAL

#define SIF_SSD1608_WIDTH_PHYSICAL   200

◆ SIF_SSD1608_WIDTH_WINDOW

#define SIF_SSD1608_WIDTH_WINDOW   192

Enumeration Type Documentation

◆ SIF_SSD1608_Clear_Mode

Enumerator
WITH_CLEAR 
WITHOUT_CLEAR 

◆ SIF_SSD1608_Update_Mode

Enumerator
FULL_UPDATE 
PARTIAL_UPDATE 

Function Documentation

◆ SIF_SSD1608_ClearDisplay()

void SIF_SSD1608_ClearDisplay ( void  )

Clears the display.

◆ SIF_SSD1608_DeepSleep()

void SIF_SSD1608_DeepSleep ( void  )

Enter deep sleep mode.

Device draws around 2uA in this mode.

◆ SIF_SSD1608_Deinitialise()

void SIF_SSD1608_Deinitialise ( void  )

EINK De-Initialisation.

◆ SIF_SSD1608_DisplayImage()

void SIF_SSD1608_DisplayImage ( const uint8_t *  image,
SIF_SSD1608_Clear_Mode  mode,
bool  full_resolution 
)

Follows Routines for clearing, waiting and displaying the image.

Parameters
image- The image to be overlaid on the eink screen.
mode- Whether or not the display will be cleared before the image is displayed
full_resolution- Whether the image provided should be displayed in full resolution or half resolution. This is is ignored when EPAPER_FULL_RESOLUTION is defined, and therefore only applies to binaries built with half resolution in mind. This allows the option to display an image (typically stored in flash) using full resolution, as an exception.

◆ SIF_SSD1608_DisplayImageNoWait()

void SIF_SSD1608_DisplayImageNoWait ( const uint8_t *  image,
SIF_SSD1608_Clear_Mode  mode,
bool  full_resolution 
)

Same as SIF_SSD1608_DisplayImage() but does not wait for busy.

Requires callback for power-down and deinitialisation.

Parameters
image- The image to be overlaid on the eink screen.
mode- Whether or not the display will be cleared before the image is displayed
full_resolution- Whether the image provided should be displayed in full resolution or half resolution. This is is ignored when EPAPER_FULL_RESOLUTION is defined, and therefore only applies to binaries built with half resolution in mind. This allows the option to display an image (typically stored in flash) using full resolution, as an exception.

◆ SIF_SSD1608_Initialise()

ca_error SIF_SSD1608_Initialise ( SIF_SSD1608_Update_Mode  mode)

EINK Initialisation.

Parameters
mode- Whether to initialise for FULL_UPDATE or PARTIAL_UPDATE

◆ SIF_SSD1608_overlay_qr_code()

ca_error SIF_SSD1608_overlay_qr_code ( const char *  text,
uint8_t *  image,
uint8_t  scale,
uint8_t  x,
uint8_t  y 
)

Creates a QR code and overlays it on top of a pre-existing image at the given coordinates.

Parameters
text- The text string that is encoded into a QR symbol.
image- The image that is overlaid by the QR symbol.
scale- scaling of the image, 1 or 2 supported.
x- The x-coordinate of the top-left corner of the QR symbol.
y- The y-coordinate of the top-left corner of the QR symbol.

◆ SIF_SSD1608_PowerDown()

ca_error SIF_SSD1608_PowerDown ( void *  aContext)

callback function for power-down when not waiting for busy signal

Parameters
aContext- Callback context (not used in function).

◆ SIF_SSD1608_StrongClearDisplay()

void SIF_SSD1608_StrongClearDisplay ( void  )

Clears the display many times to make sure there is no ghost image.

Variable Documentation

◆ sif_ssd1608_display_is_busy

bool sif_ssd1608_display_is_busy
extern