Display Simple Graphics library  v0.5
Library containing shape, text, and bitmap drawing functions called by various display drivers
Data Structures | Macros | Typedefs | Functions
simplegfx.h File Reference
#include "simpletools.h"

Go to the source code of this file.

Data Structures

struct  screen_st
 

Macros

#define SMALL   1
 
#define MEDIUM   2
 
#define LARGE   3
 
#define FONT_SANS   0
 
#define FONT_SERIF   1
 
#define FONT_SCRIPT   2
 
#define FONT_BUBBLE   3
 
#define INTF_SPI_NO_BUFFER   0b00
 
#define INTF_SPI_WITH_BUFFER   0b10
 
#define INTF_I2C_NO_BUFFER   0b01
 
#define INTF_I2C_WITH_BUFFER   0b11
 
#define gfx_swap(a, b)   (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
 
#define absv(x)   ((x)<0 ? -(x) : (x))
 
#define HEX   -16
 
#define OCT   -8
 
#define BIN   -2
 
#define DEC   -10
 

Typedefs

typedef struct screen_st screen_t
 
typedef screen_t screen
 

Functions

void clearDisplay (screen_t *dev)
 Clears (sets to the native background color of the screen, usually black) the entire screen. More...
 
void updateDisplay (screen_t *dev)
 Updates the display by writing the image buffer to it. Not necessary for screens that have their own image buffers. More...
 
void resetDisplay (screen_t *dev)
 Resets the display. More...
 
void drawPixel (screen_t *dev, int x, int y, int color)
 Draws a single pixel in the specified color. More...
 
void drawFastHLine (screen_t *dev, int x, int y, int w, int color)
 Draws a horizontal line in the specified color. More...
 
void drawFastVLine (screen_t *dev, int x, int y, int h, int color)
 Draws a vertical line in the specified color. More...
 
void drawLine (screen_t *dev, int x0, int y0, int x1, int y1, int color)
 Draws a line in the specified color. More...
 
void drawCircle (screen_t *dev, int x0, int y0, int r, int color)
 Draws a circle in the specified color. More...
 
void drawCircleHelper (screen_t *dev, int x0, int y0, int r, char cornername, int color)
 Helper function used to help draw circles and rectangles with rounded corners. More...
 
void fillCircle (screen_t *dev, int x0, int y0, int r, int color)
 Draws a filled circle in the specified color. More...
 
void fillCircleHelper (screen_t *dev, int x0, int y0, int r, char cornername, int delta, int color)
 Helper function used to draw filled circles and rectangles with rounded corners. More...
 
void drawRect (screen_t *dev, int x, int y, int w, int h, int color)
 Draws a rectangle in the specified color. More...
 
void fillRect (screen_t *dev, int x, int y, int w, int h, int color)
 Draws a filled rectangle in the specified color. More...
 
void drawRoundRect (screen_t *dev, int x, int y, int w, int h, int r, int color)
 Draws a rectangle with rounded corners in the specified color. More...
 
void fillRoundRect (screen_t *dev, int x, int y, int w, int h, int r, int color)
 Draws a filled rectangle with rounded corners in the specified color. More...
 
void drawTriangle (screen_t *dev, int x0, int y0, int x1, int y1, int x2, int y2, int color)
 Draws a triangle with in the specified color. More...
 
void fillTriangle (screen_t *dev, int x0, int y0, int x1, int y1, int x2, int y2, int color)
 Draws a filled triangle with in the specified color. More...
 
void drawCopy (screen_t *dev, int x, int y, int w, int h, int x1, int y1)
 Copies a rectagle and draws it at another location on the screen. More...
 
void setTextSize (screen_t *dev, char s)
 Sets the size of the font to be used. Range is from 1 to 3. Size (1) is 5x7 (6x8 spacing) pixels, size (2) is 11x15 (12x16 spacing) pixels and size (3) is 15x23 (16x24 spacing) pixels. More...
 
void setTextFont (screen_t *dev, char f)
 Sets the font face to be used. Range is from 0 to 3. More...
 
void setTextColor (screen_t *dev, int color)
 Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent. More...
 
void setBgColor (screen_t *dev, int color)
 Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent. More...
 
void setTextWrap (screen_t *dev, char w)
 Toggles automatic wrapping of text printed to the screen. More...
 
void setCursor (screen_t *dev, int x, int y, char size)
 Sets the cursor position based on the size parameter. More...
 
int drawPrint (screen_t *dev, const char *fmt,...)
 Print format "..." args to the screen. The output is limited to 128 bytes. More...
 
void drawNumber (screen_t *dev, float d, int r)
 Prints a number to the screen starting at the cursor position. Output is limited to 64 bytes. More...
 
void drawText (screen_t *dev, char *myString)
 Prints a string of text to the screen starting at the cursor position. Output is limited to 64 bytes. More...
 
void drawChar (screen_t *dev, char c)
 Prints single ASCII-encoded characters to the screen. Characters 32 (space) to 126 (~) are rendered. All other characters are rendered as a box. More...
 
int getCursorX (screen_t *dev)
 Returns the current horizontal position of the cursor, measured from the left side of the screen in pixels. More...
 
int getCursorY (screen_t *dev)
 Returns the current vertical position of the cursor, measured from the top of the screen in pixels. More...
 
void setDisplayRotation (screen_t *dev, char r)
 Sets the screen's orientation. More...
 
char getDisplayRotation (screen_t *dev)
 Returns the screen's orientation. More...
 
int getDisplayWidth (screen_t *dev)
 Returns the width of the display in pixels with screen rotation taken into account. More...
 
int getDisplayHeight (screen_t *dev)
 Returns the height of the display in pixels with screen rotation taken into account. More...
 
void loadFonts (screen_t *dev, i2c *eeBus)
 Internal function used to load the EEPROM addresses of the bitmapped fonts to the device's structure. This function is called by the init function in the display's library. It can be called at any time to point to fonts stored in an EEPROM attached to a different i2c bus. More...
 
void drawCharSmall (screen_t *dev, unsigned char c)
 Low-level helper function for printing single characters to the screen in the small (5x7) font. More...
 
void drawCharMedium (screen_t *dev, unsigned char c)
 Low-level helper function for printing single characters to the screen in the medium (11x15) font. More...
 
void drawCharLarge (screen_t *dev, unsigned char c)
 Low-level helper function for printing single characters to the screen in the large (17x23) font. More...
 
void invertDisplay (screen_t *dev, char i)
 Toggles the invert/normal display modes for the display. Depending on the display type it may only invert existing drawings, or it may invert both existing and colors drawn when inversion is set. More...
 
void sleepWakeDisplay (screen_t *dev, char i)
 Toggle the display's sleep/wake mode. Not supported by all displays. More...
 
void scrollDisplay (screen_t *dev, int h, int v)
 Set the display's vertical or hrizontal scrolling functions.
Not supported by all displays, and different display types behave differently. More...
 
char isInverted (screen_t *dev)
 Returns the status of the screen's colors - normal or inverted. More...
 
char isAsleep (screen_t *dev)
 Returns whether the screen is currently in a sleep mode or awake. More...
 
unsigned char getScrollVertical (screen_t *dev)
 Returns a value representing the status or speed of the display's vertical scroll. More...
 
unsigned char getScrollHorizontal (screen_t *dev)
 Returns a value representing the status or speed of the display's horizontal scroll. More...
 
void drawBitmap (screen_t *dev, char *imgdir, int x, int y)
 Draw an image (bitmap) at the specified (x,y) position.
Requires an SD card to be mounted. More...
 

Function Documentation

◆ clearDisplay()

void clearDisplay ( screen_t dev)

Clears (sets to the native background color of the screen, usually black) the entire screen.

Parameters
devPointer to the display's device structure returned by the initialization function.

◆ drawBitmap()

void drawBitmap ( screen_t dev,
char *  imgdir,
int  x,
int  y 
)

Draw an image (bitmap) at the specified (x,y) position.
Requires an SD card to be mounted.

Parameters
devPointer to the display's device structure returned by the initialization function.
imgdirString of the filename of the bitmap stored on the SD card.
xHorizontal coordinate of the top-left corner of where to draw the image.
yVertical coordinate of the top-left corner of where to draw the image.

◆ drawChar()

void drawChar ( screen_t dev,
char  c 
)

Prints single ASCII-encoded characters to the screen. Characters 32 (space) to 126 (~) are rendered. All other characters are rendered as a box.

Parameters
devPointer to the display's device structure returned by the initialization function.
cASCII-encoded character to draw.

◆ drawCharLarge()

void drawCharLarge ( screen_t dev,
unsigned char  c 
)

Low-level helper function for printing single characters to the screen in the large (17x23) font.

Parameters
devPointer to the display's device structure returned by the initialization function.
cASCII-encoded character to draw.

◆ drawCharMedium()

void drawCharMedium ( screen_t dev,
unsigned char  c 
)

Low-level helper function for printing single characters to the screen in the medium (11x15) font.

Parameters
devPointer to the display's device structure returned by the initialization function.
cASCII-encoded character to draw.

◆ drawCharSmall()

void drawCharSmall ( screen_t dev,
unsigned char  c 
)

Low-level helper function for printing single characters to the screen in the small (5x7) font.

Parameters
devPointer to the display's device structure returned by the initialization function.
cASCII-encoded character to draw.

◆ drawCircle()

void drawCircle ( screen_t dev,
int  x0,
int  y0,
int  r,
int  color 
)

Draws a circle in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the center of the circle, counted from the left side of the screen.
y0Vertical coordinate of the center of the circle, counted down from the top of the screen.
rRadius of the circle.
colorColor of the shape, in the format native to the display.

◆ drawCircleHelper()

void drawCircleHelper ( screen_t dev,
int  x0,
int  y0,
int  r,
char  cornername,
int  color 
)

Helper function used to help draw circles and rectangles with rounded corners.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the center of the arc, counted from the left side of the screen.
y0Vertical coordinate of the center of the arc, counted down from the top of the screen.
rRadius of the arc.
cornernameWhich corner (arc) to draw
colorColor of the shape, in the format native to the display.

◆ drawCopy()

void drawCopy ( screen_t dev,
int  x,
int  y,
int  w,
int  h,
int  x1,
int  y1 
)

Copies a rectagle and draws it at another location on the screen.

Parameters
devPointer to the display's device structure returned by the initialization function.
xHorizontal coordinate of the top-left corner of the rectangle to be copied.
yVertical coordinate of the top-left corner of the rectagle to be copied.
wWidth of the rectagle to be copied.
hHeight of the rectagle to be copied.
x1Horizontal coordinate of the location to paste the copied rectagle to.
y1Vertical coordinate of the location to paste the copied rectagle to.

◆ drawFastHLine()

void drawFastHLine ( screen_t dev,
int  x,
int  y,
int  w,
int  color 
)

Draws a horizontal line in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the line, counted from the left side of the screen.
yStarting vertical coordinate of the line, counted down from the top of the screen.
wLength of the line.
colorColor of the line, in the format native to the display.

◆ drawFastVLine()

void drawFastVLine ( screen_t dev,
int  x,
int  y,
int  h,
int  color 
)

Draws a vertical line in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the line, counted from the left side of the screen.
yStarting vertical coordinate of the line, counted down from the top of the screen.
hLength of the line.
colorColor of the line, in the format native to the display.

◆ drawLine()

void drawLine ( screen_t dev,
int  x0,
int  y0,
int  x1,
int  y1,
int  color 
)

Draws a line in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Starting horizontal coordinate of the line, counted from the left side of the screen.
y0Starting vertical coordinate of the line, counted down from the top of the screen.
x1Ending horizontal coordinate of the line.
y1Ending vertical coordinate of the line.
colorColor of the shape, in the format native to the display.

◆ drawNumber()

void drawNumber ( screen_t dev,
float  d,
int  r 
)

Prints a number to the screen starting at the cursor position. Output is limited to 64 bytes.

Parameters
devPointer to the display's device structure returned by the initialization function.
dNumber to be printed to the screen. The number can be either a floating point decimal or an integer.
rThe number base to display the number in (for integers); HEX, BIN, OCT, and DEC are acceptable values. or the number of decimals to display following the decimal point (for floating point numbers). Negative numbers in bases other than DEC will display "Err".

◆ drawPixel()

void drawPixel ( screen_t dev,
int  x,
int  y,
int  color 
)

Draws a single pixel in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xHorizontal coordinate of the pixel, counted from the left side of the screen.
yVertical coordinate of the pixel, counted down from the top of the screen.
colorColor of the pixel, in the format native to the display.

◆ drawPrint()

int drawPrint ( screen_t dev,
const char *  fmt,
  ... 
)

Print format "..." args to the screen. The output is limited to 128 bytes.

Parameters
devPointer to the display's device structure returned by the initialization function.
fmtFormatted string to be printed to the display.

◆ drawRect()

void drawRect ( screen_t dev,
int  x,
int  y,
int  w,
int  h,
int  color 
)

Draws a rectangle in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the rectangle, counted from the left side of the screen.
yStarting vertical coordinate of the rectangle, counted down from the top of the screen.
wWidth of the rectangle.
hHeight of the rectangle.
colorColor of the shape, in the format native to the display.

◆ drawRoundRect()

void drawRoundRect ( screen_t dev,
int  x,
int  y,
int  w,
int  h,
int  r,
int  color 
)

Draws a rectangle with rounded corners in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the rectangle, counted from the left side of the screen.
yStarting vertical coordinate of the rectangle, counted down from the top of the screen.
wWidth of the rectangle.
hHeight of the rectangle.
rRadius of the rounded corners.
colorColor of the shape, in the format native to the display.

◆ drawText()

void drawText ( screen_t dev,
char *  myString 
)

Prints a string of text to the screen starting at the cursor position. Output is limited to 64 bytes.

Parameters
devPointer to the display's device structure returned by the initialization function.
*myStringText to display on the screen.

◆ drawTriangle()

void drawTriangle ( screen_t dev,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Draws a triangle with in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the first vertex (corner) of the triangle, counted from the left side of the screen.
y0Vertical coordinate of the first vertex (corner) of the triangle, counted down from the top of the screen.
x1Horizontal coordinate of the second vertex of the triangle.
y1Vertical coordinate of the first vertex of the triangle.
x2Horizontal coordinate of the third vertex of the triangle.
y2Vertical coordinate of the third vertex of the triangle.
colorColor of the shape, in the format native to the display.

◆ fillCircle()

void fillCircle ( screen_t dev,
int  x0,
int  y0,
int  r,
int  color 
)

Draws a filled circle in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the center of the circle, counted from the left side of the screen.
y0Vertical coordinate of the center of the circle, counted down from the top of the screen.
rRadius of the circle.
colorColor of the shape, in the format native to the display.

◆ fillCircleHelper()

void fillCircleHelper ( screen_t dev,
int  x0,
int  y0,
int  r,
char  cornername,
int  delta,
int  color 
)

Helper function used to draw filled circles and rectangles with rounded corners.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the center of the arc, counted from the left side of the screen.
y0Vertical coordinate of the center of the arc, counted down from the top of the screen.
rRadius of the arc.
cornernameWhich corner (arc) to draw
deltaOffest from the center line (space between quarter circles) used for drawing rounded rectagles
colorColor of the shape, in the format native to the display.

◆ fillRect()

void fillRect ( screen_t dev,
int  x,
int  y,
int  w,
int  h,
int  color 
)

Draws a filled rectangle in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the rectangle, counted from the left side of the screen.
yStarting vertical coordinate of the rectangle, counted down from the top of the screen.
wWidth of the rectangle.
hHeight of the rectangle.
colorColor of the shape, in the format native to the display.

◆ fillRoundRect()

void fillRoundRect ( screen_t dev,
int  x,
int  y,
int  w,
int  h,
int  r,
int  color 
)

Draws a filled rectangle with rounded corners in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the rectangle, counted from the left side of the screen.
yStarting vertical coordinate of the rectangle, counted down from the top of the screen.
wWidth of the rectangle.
hHeight of the rectangle.
rRadius of the rounded corners.
colorColor of the shape, in the format native to the display.

◆ fillTriangle()

void fillTriangle ( screen_t dev,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Draws a filled triangle with in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the first vertex (corner) of the triangle, counted from the left side of the screen.
y0Vertical coordinate of the first vertex (corner) of the triangle, counted down from the top of the screen.
x1Horizontal coordinate of the second vertex of the triangle.
y1Vertical coordinate of the first vertex of the triangle.
x2Horizontal coordinate of the third vertex of the triangle.
y2Vertical coordinate of the third vertex of the triangle.
colorColor of the shape, in the format native to the display.

◆ getCursorX()

int getCursorX ( screen_t dev)

Returns the current horizontal position of the cursor, measured from the left side of the screen in pixels.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
the horizontal position of the cursor in pixels.

◆ getCursorY()

int getCursorY ( screen_t dev)

Returns the current vertical position of the cursor, measured from the top of the screen in pixels.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
the vertical position of the cursor in pixels.

◆ getDisplayHeight()

int getDisplayHeight ( screen_t dev)

Returns the height of the display in pixels with screen rotation taken into account.

Parameters
devPointer to the display's device structure returned by the initialization function.

◆ getDisplayRotation()

char getDisplayRotation ( screen_t dev)

Returns the screen's orientation.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
A number representing the screen's orientation. (0) means pixels are drawn to the screen is at it's native orientation, (1) means pixels are drawn rotated 90 degrees clockwise, (2) means pixels are drawn upside-down - 180 degrees rotated, and (3) means pixels are drawn rotated 270 degrees clockwise.

◆ getDisplayWidth()

int getDisplayWidth ( screen_t dev)

Returns the width of the display in pixels with screen rotation taken into account.

Parameters
devPointer to the display's device structure returned by the initialization function.

◆ getScrollHorizontal()

unsigned char getScrollHorizontal ( screen_t dev)

Returns a value representing the status or speed of the display's horizontal scroll.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
A value representing the horizontal scrolling velocity (or 1 if the screen only supports a single scrolling speed).

◆ getScrollVertical()

unsigned char getScrollVertical ( screen_t dev)

Returns a value representing the status or speed of the display's vertical scroll.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
A value representing the vertical scrolling velocity (or 1 if the screen only supports a single scrolling speed).

◆ invertDisplay()

void invertDisplay ( screen_t dev,
char  i 
)

Toggles the invert/normal display modes for the display. Depending on the display type it may only invert existing drawings, or it may invert both existing and colors drawn when inversion is set.

Parameters
devPointer to the display's device structure returned by the initialization function.
iSet to 0 for normal and 1 for inverted.

◆ isAsleep()

char isAsleep ( screen_t dev)

Returns whether the screen is currently in a sleep mode or awake.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
A value of 1 if the screenis asleep, and 0 if the screen is awake

◆ isInverted()

char isInverted ( screen_t dev)

Returns the status of the screen's colors - normal or inverted.

Parameters
devPointer to the display's device structure returned by the initialization function.
Returns
A value of 1 if the screen's colors are inverted, and 0 if the screen's colors are normal (not-inverted).

◆ loadFonts()

void loadFonts ( screen_t dev,
i2c *  eeBus 
)

Internal function used to load the EEPROM addresses of the bitmapped fonts to the device's structure. This function is called by the init function in the display's library. It can be called at any time to point to fonts stored in an EEPROM attached to a different i2c bus.

Parameters
devPointer to the display's device structure returned by the initialization function.
eeBusPointer to the i2c bus where the EEPROM containing the font bitmaps is connected.

◆ resetDisplay()

void resetDisplay ( screen_t dev)

Resets the display.

Parameters
devPointer to the display's device structure returned by the initialization function.

◆ scrollDisplay()

void scrollDisplay ( screen_t dev,
int  h,
int  v 
)

Set the display's vertical or hrizontal scrolling functions.
Not supported by all displays, and different display types behave differently.

Parameters
devPointer to the display's device structure returned by the initialization function.
hSets the horizontal display velocity, or for displays with only on/off modes, any non-zero value will trigger a horizontal scroll. Enter zero to stop horizontal scrolling.
vSets the vertical display velocity, or for displays with only on/off modes, any non-zero value will trigger a vertical scroll. Enter zero to stop vertical scrolling.

◆ setBgColor()

void setBgColor ( screen_t dev,
int  color 
)

Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent.

Parameters
devPointer to the display's device structure returned by the initialization function.
colorColor of the font, in the format native to the display.

◆ setCursor()

void setCursor ( screen_t dev,
int  x,
int  y,
char  size 
)

Sets the cursor position based on the size parameter.

Parameters
devPointer to the display's device structure returned by the initialization function.
xHorizontal position of the cursor, counted from the left side of the screen.
yVertical position of the cursor, counted down from the top of the screen.
sizeThe size of the cursor. Correlated to font size: (0) moves the cursor in 1 pixel increments, (1) moves the cursor in font size 1 character increments, (2) moves the cursor in font size 2 increments and (3) moves the cursor in font size 3 increments

◆ setDisplayRotation()

void setDisplayRotation ( screen_t dev,
char  r 
)

Sets the screen's orientation.

Parameters
devPointer to the display's device structure returned by the initialization function.
rNumber representing the orientation to set the display to. (0) means pixels are drawn to the screen is at it's native orientation, (1) means pixels are drawn rotated 90 degrees clockwise, (2) means pixels are drawn upside-down - 180 degrees rotated, and (3) means pixels are drawn rotated 270 degrees clockwise.

◆ setTextColor()

void setTextColor ( screen_t dev,
int  color 
)

Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent.

Parameters
devPointer to the display's device structure returned by the initialization function.
colorColor of the font, in the format native to the display.

◆ setTextFont()

void setTextFont ( screen_t dev,
char  f 
)

Sets the font face to be used. Range is from 0 to 3.

Parameters
devPointer to the display's device structure returned by the initialization function.
fFont face to use. Font face (0) is a sans-serif (console) font, face (1) is serif (typewriter) font, face (2) is a script (handwriting) font and face (3) is a bubble (outline/cartoon) font.

◆ setTextSize()

void setTextSize ( screen_t dev,
char  s 
)

Sets the size of the font to be used. Range is from 1 to 3. Size (1) is 5x7 (6x8 spacing) pixels, size (2) is 11x15 (12x16 spacing) pixels and size (3) is 15x23 (16x24 spacing) pixels.

Parameters
devPointer to the display's device structure returned by the initialization function.
sSize of text to draw. 1 = small (5x7) font, 2 = medium (11x15) font, 3 = large (17x23) font.

◆ setTextWrap()

void setTextWrap ( screen_t dev,
char  w 
)

Toggles automatic wrapping of text printed to the screen.

Parameters
devPointer to the display's device structure returned by the initialization function.
wWrapping (0) off -OR- (1) on.

◆ sleepWakeDisplay()

void sleepWakeDisplay ( screen_t dev,
char  i 
)

Toggle the display's sleep/wake mode. Not supported by all displays.

Parameters
devPointer to the display's device structure returned by the initialization function.
iSet to 0 for awake and 1 for asleep.

◆ updateDisplay()

void updateDisplay ( screen_t dev)

Updates the display by writing the image buffer to it. Not necessary for screens that have their own image buffers.

Parameters
devPointer to the display's device structure returned by the initialization function.