# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_pyupm_ili9341', [dirname(__file__)])
except ImportError:
import _pyupm_ili9341
return _pyupm_ili9341
if fp is not None:
try:
_mod = imp.load_module('_pyupm_ili9341', fp, pathname, description)
finally:
fp.close()
return _mod
_pyupm_ili9341 = swig_import_helper()
del swig_import_helper
else:
import _pyupm_ili9341
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
if (not static):
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object:
pass
_newclass = 0
def getVersion():
return _pyupm_ili9341.getVersion()
getVersion = _pyupm_ili9341.getVersion
[docs]class GFX(_object):
"""
GFX helper class.
This file is used by the screen.
C++ includes: ili9341_gfx.hpp
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, GFX, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, GFX, name)
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _pyupm_ili9341.delete_GFX
__del__ = lambda self: None
[docs] def drawPixel(self, x, y, color):
"""
virtual void
drawPixel(int16_t x, int16_t y, uint16_t color)=0
Sends a pixel color (RGB) to the chip. Must be implemented by the
inherited class.
Parameters:
-----------
x: Axis on the horizontal scale
y: Axis on the vertical scale
color: RGB value
"""
return _pyupm_ili9341.GFX_drawPixel(self, x, y, color)
[docs] def drawLine(self, x0, y0, x1, y1, color):
"""
void drawLine(int16_t x0,
int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Draws a line from coordinate C0 to coordinate C1
Parameters:
-----------
x0: First coordinate
y0: First coordinate
x1: Second coordinate
y1: Second coordinate
color: selected color
"""
return _pyupm_ili9341.GFX_drawLine(self, x0, y0, x1, y1, color)
[docs] def drawFastVLine(self, x, y, h, color):
"""
void
drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Draws a line on the vertical scale
Parameters:
-----------
x: Axis on the horizontal scale
y: Axis on the vertical scale
h: Distanse from y
color: Selected color
"""
return _pyupm_ili9341.GFX_drawFastVLine(self, x, y, h, color)
[docs] def drawFastHLine(self, x, y, w, color):
"""
void
drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Draws a horizontal line using minimal SPI writes.
Parameters:
-----------
x: Axis on the horizontal scale to begin line
y: Axis on the vertical scale to begin line
w: Width of line in pixels
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_drawFastHLine(self, x, y, w, color)
[docs] def drawRect(self, x, y, w, h, color):
"""
void drawRect(int16_t x,
int16_t y, int16_t w, int16_t h, uint16_t color)
Draws a rectangle (not filled).
Parameters:
-----------
x: Position of upper left corner on horizontal axis
y: Position of upper left corner on vertical axis
w: Width of rectangle
h: Height of rectangle RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_drawRect(self, x, y, w, h, color)
[docs] def fillRect(self, x, y, w, h, color):
"""
void fillRect(int16_t x,
int16_t y, int16_t w, int16_t h, uint16_t color)
Fills a rectangle with a selected color
Parameters:
-----------
x: Axis on the horizontal scale (top-left corner)
y: Axis on the vertical scale (top-left corner)
w: Distanse from x
h: Distanse from y
color: Selected color
"""
return _pyupm_ili9341.GFX_fillRect(self, x, y, w, h, color)
[docs] def fillScreen(self, color):
"""
void fillScreen(uint16_t
color)
Fills the screen with a selected color
Parameters:
-----------
color: Selected color
"""
return _pyupm_ili9341.GFX_fillScreen(self, color)
[docs] def invertDisplay(self, i):
"""
void
invertDisplay(bool i)
Invert colors on the display.
Parameters:
-----------
i: True or false to invert colors
"""
return _pyupm_ili9341.GFX_invertDisplay(self, i)
[docs] def drawCircle(self, x0, y0, r, color):
"""
void drawCircle(int16_t
x, int16_t y, int16_t r, uint16_t color)
Draws a circle
Parameters:
-----------
x: Center of the circle on the horizontal scale
y: Center of the circle on the vertical scale
r: Radius of the circle
color: Color of the circle
"""
return _pyupm_ili9341.GFX_drawCircle(self, x0, y0, r, color)
[docs] def drawCircleHelper(self, x0, y0, r, cornername, color):
"""
void
drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t
cornername, uint16_t color)
Used to draw rounded corners.
Parameters:
-----------
x0: Center point of circle on x-axis
y0: Center point of circle on y-axis
r: Radius of circle
cornername: Mask of corner number (1, 2, 4, 8)
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_drawCircleHelper(self, x0, y0, r, cornername, color)
[docs] def fillCircle(self, x0, y0, r, color):
"""
void fillCircle(int16_t
x0, int16_t y0, int16_t r, uint16_t color)
Draws a filled circle.
Parameters:
-----------
x0: Center point of circle on x-axis
y0: Center point of circle on y-axis
r: Radius of circle
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_fillCircle(self, x0, y0, r, color)
[docs] def fillCircleHelper(self, x0, y0, r, cornername, delta, color):
"""
void
fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t
cornername, int16_t delta, uint16_t color)
Used to draw a filled circle and rounded rectangles.
Parameters:
-----------
x0: Center point of circle on x-axis
y0: Center point of circle on y-axis
r: Radius of circle
cornername: Mask of corner number (1, 2, 4, 8)
delta: Line offset
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_fillCircleHelper(self, x0, y0, r, cornername, delta, color)
[docs] def drawTriangle(self, x0, y0, x1, y1, x2, y2, color):
"""
void
drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t
x2, int16_t y2, uint16_t color)
Draws a triangle
Parameters:
-----------
x0: First coordinate
y0: First coordinate
x1: Second coordinate
y1: Second coordinate
x2: Third coordinate
y2: Third coordinate
color: Selected color
"""
return _pyupm_ili9341.GFX_drawTriangle(self, x0, y0, x1, y1, x2, y2, color)
[docs] def fillTriangle(self, x0, y0, x1, y1, x2, y2, color):
"""
void
fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t
x2, int16_t y2, uint16_t color)
Draw a filled triangle.
Parameters:
-----------
x0: First point coordinate on x-axis
y0: First point coordinate on y-axis
x1: Second point coordinate on x-axis
y1: Second point coordinate on y-axis
x2: Third point coordinate on x-axis
y2: Third point coordinate on y-axis
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_fillTriangle(self, x0, y0, x1, y1, x2, y2, color)
[docs] def drawRoundRect(self, x0, y0, w, h, radius, color):
"""
void
drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t
radius, uint16_t color)
Draw a rectangle with rounded corners
Parameters:
-----------
x0: X-axis coordinate of top-left corner
y0: Y-axis coordinate of top-left corner
w: Width of rectangle
h: height of rectangle
radius: Radius of rounded corners
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_drawRoundRect(self, x0, y0, w, h, radius, color)
[docs] def fillRoundRect(self, x0, y0, w, h, radius, color):
"""
void
fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t
radius, uint16_t color)
Draw a filled rectangle with rounded corners
Parameters:
-----------
x0: X-axis coordinate of top-left corner
y0: Y-axis coordinate of top-left corner
w: Width of rectangle
h: height of rectangle
radius: Radius of rounded corners
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.GFX_fillRoundRect(self, x0, y0, w, h, radius, color)
[docs] def drawChar(self, x, y, c, color, bg, size):
"""
void drawChar(int16_t x,
int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size)
Parameters:
-----------
x: Axis on the horizontal scale
y: Axis on the vertical scale
data: Character to write
color: Character color
bg: Character background color
size: Size of the font
"""
return _pyupm_ili9341.GFX_drawChar(self, x, y, c, color, bg, size)
[docs] def getCursorX(self):
"""
int16_t getCursorX(void)
const
Get the x-axis coordinate of the upper-left corner of the cursor.
X-axis coordinate of the cursor
"""
return _pyupm_ili9341.GFX_getCursorX(self)
[docs] def getCursorY(self):
"""
int16_t getCursorY(void)
const
Get the y-axis coordinate of the upper-left corner of the cursor.
Y-axis coordinate of the cursor
"""
return _pyupm_ili9341.GFX_getCursorY(self)
[docs] def setCursor(self, x, y):
"""
void setCursor(int16_t x,
int16_t y)
Sets the cursor for a text message
Parameters:
-----------
x: Axis on the horizontal scale
y: Axis on the vertical scale
"""
return _pyupm_ili9341.GFX_setCursor(self, x, y)
[docs] def setTextColor(self, *args):
"""
void
setTextColor(uint16_t textColor, uint16_t textBGColor)
Sets a text color for a message
Parameters:
-----------
textColor: Font color
textBGColor: Background color
"""
return _pyupm_ili9341.GFX_setTextColor(self, *args)
[docs] def setTextSize(self, s):
"""
void
setTextSize(uint8_t size)
Sets the size of the font
Parameters:
-----------
size: Font size
"""
return _pyupm_ili9341.GFX_setTextSize(self, s)
[docs] def setTextWrap(self, w):
"""
void
setTextWrap(uint8_t wrap)
Wraps a printed message
Parameters:
-----------
wrap: True (0x1) or false (0x0)
"""
return _pyupm_ili9341.GFX_setTextWrap(self, w)
[docs] def getRotation(self):
"""
uint8_t
getRotation(void) const
Get the current rotation configuration of the screen.
current rotation 0-3
"""
return _pyupm_ili9341.GFX_getRotation(self)
[docs] def setRotation(self, r):
"""
void
setRotation(uint8_t r)
Sets the rotation of the screen. Can be overridden with another
screen-specific definition.
Parameters:
-----------
r: Rotation 0-3
"""
return _pyupm_ili9341.GFX_setRotation(self, r)
[docs] def cp437(self, x):
"""
void cp437(bool x)
Enable (or disable) Code Page 437-compatible charset.
Parameters:
-----------
x: True to enable CP437 charset. False to disable.
"""
return _pyupm_ili9341.GFX_cp437(self, x)
[docs] def write(self, c):
"""
void write(uint8_t c)
Write a character at the current cursor position. Definition can be
overridden with board-specific code.
Parameters:
-----------
c: Character to draw
"""
return _pyupm_ili9341.GFX_write(self, c)
def _print(self, msg):
"""
void print(std::string msg)
Prints a message on the screen
Parameters:
-----------
msg: Message to print
"""
return _pyupm_ili9341.GFX__print(self, msg)
[docs] def width(self):
"""
int16_t width(void) const
Get the current width of the screen.
the width in pixels
"""
return _pyupm_ili9341.GFX_width(self)
[docs] def height(self):
"""
int16_t height(void) const
Get the current height of the screen.
the height in pixels
"""
return _pyupm_ili9341.GFX_height(self)
GFX_swigregister = _pyupm_ili9341.GFX_swigregister
GFX_swigregister(GFX)
_pyupm_ili9341.ILI9341_TFTWIDTH_swigconstant(_pyupm_ili9341)
ILI9341_TFTWIDTH = _pyupm_ili9341.ILI9341_TFTWIDTH
_pyupm_ili9341.ILI9341_TFTHEIGHT_swigconstant(_pyupm_ili9341)
ILI9341_TFTHEIGHT = _pyupm_ili9341.ILI9341_TFTHEIGHT
_pyupm_ili9341.SPI_FREQ_swigconstant(_pyupm_ili9341)
SPI_FREQ = _pyupm_ili9341.SPI_FREQ
_pyupm_ili9341.ILI9341_NOP_swigconstant(_pyupm_ili9341)
ILI9341_NOP = _pyupm_ili9341.ILI9341_NOP
_pyupm_ili9341.ILI9341_SWRESET_swigconstant(_pyupm_ili9341)
ILI9341_SWRESET = _pyupm_ili9341.ILI9341_SWRESET
_pyupm_ili9341.ILI9341_RDDID_swigconstant(_pyupm_ili9341)
ILI9341_RDDID = _pyupm_ili9341.ILI9341_RDDID
_pyupm_ili9341.ILI9341_RDDST_swigconstant(_pyupm_ili9341)
ILI9341_RDDST = _pyupm_ili9341.ILI9341_RDDST
_pyupm_ili9341.ILI9341_SLPIN_swigconstant(_pyupm_ili9341)
ILI9341_SLPIN = _pyupm_ili9341.ILI9341_SLPIN
_pyupm_ili9341.ILI9341_SLPOUT_swigconstant(_pyupm_ili9341)
ILI9341_SLPOUT = _pyupm_ili9341.ILI9341_SLPOUT
_pyupm_ili9341.ILI9341_PTLON_swigconstant(_pyupm_ili9341)
ILI9341_PTLON = _pyupm_ili9341.ILI9341_PTLON
_pyupm_ili9341.ILI9341_NORON_swigconstant(_pyupm_ili9341)
ILI9341_NORON = _pyupm_ili9341.ILI9341_NORON
_pyupm_ili9341.ILI9341_RDMODE_swigconstant(_pyupm_ili9341)
ILI9341_RDMODE = _pyupm_ili9341.ILI9341_RDMODE
_pyupm_ili9341.ILI9341_RDMADCTL_swigconstant(_pyupm_ili9341)
ILI9341_RDMADCTL = _pyupm_ili9341.ILI9341_RDMADCTL
_pyupm_ili9341.ILI9341_RDPIXFMT_swigconstant(_pyupm_ili9341)
ILI9341_RDPIXFMT = _pyupm_ili9341.ILI9341_RDPIXFMT
_pyupm_ili9341.ILI9341_RDIMGFMT_swigconstant(_pyupm_ili9341)
ILI9341_RDIMGFMT = _pyupm_ili9341.ILI9341_RDIMGFMT
_pyupm_ili9341.ILI9341_RDSELFDIAG_swigconstant(_pyupm_ili9341)
ILI9341_RDSELFDIAG = _pyupm_ili9341.ILI9341_RDSELFDIAG
_pyupm_ili9341.ILI9341_INVOFF_swigconstant(_pyupm_ili9341)
ILI9341_INVOFF = _pyupm_ili9341.ILI9341_INVOFF
_pyupm_ili9341.ILI9341_INVON_swigconstant(_pyupm_ili9341)
ILI9341_INVON = _pyupm_ili9341.ILI9341_INVON
_pyupm_ili9341.ILI9341_GAMMASET_swigconstant(_pyupm_ili9341)
ILI9341_GAMMASET = _pyupm_ili9341.ILI9341_GAMMASET
_pyupm_ili9341.ILI9341_DISPOFF_swigconstant(_pyupm_ili9341)
ILI9341_DISPOFF = _pyupm_ili9341.ILI9341_DISPOFF
_pyupm_ili9341.ILI9341_DISPON_swigconstant(_pyupm_ili9341)
ILI9341_DISPON = _pyupm_ili9341.ILI9341_DISPON
_pyupm_ili9341.ILI9341_CASET_swigconstant(_pyupm_ili9341)
ILI9341_CASET = _pyupm_ili9341.ILI9341_CASET
_pyupm_ili9341.ILI9341_PASET_swigconstant(_pyupm_ili9341)
ILI9341_PASET = _pyupm_ili9341.ILI9341_PASET
_pyupm_ili9341.ILI9341_RAMWR_swigconstant(_pyupm_ili9341)
ILI9341_RAMWR = _pyupm_ili9341.ILI9341_RAMWR
_pyupm_ili9341.ILI9341_RAMRD_swigconstant(_pyupm_ili9341)
ILI9341_RAMRD = _pyupm_ili9341.ILI9341_RAMRD
_pyupm_ili9341.ILI9341_PTLAR_swigconstant(_pyupm_ili9341)
ILI9341_PTLAR = _pyupm_ili9341.ILI9341_PTLAR
_pyupm_ili9341.ILI9341_MADCTL_swigconstant(_pyupm_ili9341)
ILI9341_MADCTL = _pyupm_ili9341.ILI9341_MADCTL
_pyupm_ili9341.ILI9341_PIXFMT_swigconstant(_pyupm_ili9341)
ILI9341_PIXFMT = _pyupm_ili9341.ILI9341_PIXFMT
_pyupm_ili9341.ILI9341_FRMCTR1_swigconstant(_pyupm_ili9341)
ILI9341_FRMCTR1 = _pyupm_ili9341.ILI9341_FRMCTR1
_pyupm_ili9341.ILI9341_FRMCTR2_swigconstant(_pyupm_ili9341)
ILI9341_FRMCTR2 = _pyupm_ili9341.ILI9341_FRMCTR2
_pyupm_ili9341.ILI9341_FRMCTR3_swigconstant(_pyupm_ili9341)
ILI9341_FRMCTR3 = _pyupm_ili9341.ILI9341_FRMCTR3
_pyupm_ili9341.ILI9341_INVCTR_swigconstant(_pyupm_ili9341)
ILI9341_INVCTR = _pyupm_ili9341.ILI9341_INVCTR
_pyupm_ili9341.ILI9341_DFUNCTR_swigconstant(_pyupm_ili9341)
ILI9341_DFUNCTR = _pyupm_ili9341.ILI9341_DFUNCTR
_pyupm_ili9341.ILI9341_PWCTR1_swigconstant(_pyupm_ili9341)
ILI9341_PWCTR1 = _pyupm_ili9341.ILI9341_PWCTR1
_pyupm_ili9341.ILI9341_PWCTR2_swigconstant(_pyupm_ili9341)
ILI9341_PWCTR2 = _pyupm_ili9341.ILI9341_PWCTR2
_pyupm_ili9341.ILI9341_PWCTR3_swigconstant(_pyupm_ili9341)
ILI9341_PWCTR3 = _pyupm_ili9341.ILI9341_PWCTR3
_pyupm_ili9341.ILI9341_PWCTR4_swigconstant(_pyupm_ili9341)
ILI9341_PWCTR4 = _pyupm_ili9341.ILI9341_PWCTR4
_pyupm_ili9341.ILI9341_PWCTR5_swigconstant(_pyupm_ili9341)
ILI9341_PWCTR5 = _pyupm_ili9341.ILI9341_PWCTR5
_pyupm_ili9341.ILI9341_VMCTR1_swigconstant(_pyupm_ili9341)
ILI9341_VMCTR1 = _pyupm_ili9341.ILI9341_VMCTR1
_pyupm_ili9341.ILI9341_VMCTR2_swigconstant(_pyupm_ili9341)
ILI9341_VMCTR2 = _pyupm_ili9341.ILI9341_VMCTR2
_pyupm_ili9341.ILI9341_RDID1_swigconstant(_pyupm_ili9341)
ILI9341_RDID1 = _pyupm_ili9341.ILI9341_RDID1
_pyupm_ili9341.ILI9341_RDID2_swigconstant(_pyupm_ili9341)
ILI9341_RDID2 = _pyupm_ili9341.ILI9341_RDID2
_pyupm_ili9341.ILI9341_RDID3_swigconstant(_pyupm_ili9341)
ILI9341_RDID3 = _pyupm_ili9341.ILI9341_RDID3
_pyupm_ili9341.ILI9341_RDID4_swigconstant(_pyupm_ili9341)
ILI9341_RDID4 = _pyupm_ili9341.ILI9341_RDID4
_pyupm_ili9341.ILI9341_GMCTRP1_swigconstant(_pyupm_ili9341)
ILI9341_GMCTRP1 = _pyupm_ili9341.ILI9341_GMCTRP1
_pyupm_ili9341.ILI9341_GMCTRN1_swigconstant(_pyupm_ili9341)
ILI9341_GMCTRN1 = _pyupm_ili9341.ILI9341_GMCTRN1
_pyupm_ili9341.MADCTL_MY_swigconstant(_pyupm_ili9341)
MADCTL_MY = _pyupm_ili9341.MADCTL_MY
_pyupm_ili9341.MADCTL_MX_swigconstant(_pyupm_ili9341)
MADCTL_MX = _pyupm_ili9341.MADCTL_MX
_pyupm_ili9341.MADCTL_MV_swigconstant(_pyupm_ili9341)
MADCTL_MV = _pyupm_ili9341.MADCTL_MV
_pyupm_ili9341.MADCTL_ML_swigconstant(_pyupm_ili9341)
MADCTL_ML = _pyupm_ili9341.MADCTL_ML
_pyupm_ili9341.MADCTL_RGB_swigconstant(_pyupm_ili9341)
MADCTL_RGB = _pyupm_ili9341.MADCTL_RGB
_pyupm_ili9341.MADCTL_BGR_swigconstant(_pyupm_ili9341)
MADCTL_BGR = _pyupm_ili9341.MADCTL_BGR
_pyupm_ili9341.MADCTL_MH_swigconstant(_pyupm_ili9341)
MADCTL_MH = _pyupm_ili9341.MADCTL_MH
_pyupm_ili9341.HIGH_swigconstant(_pyupm_ili9341)
HIGH = _pyupm_ili9341.HIGH
_pyupm_ili9341.LOW_swigconstant(_pyupm_ili9341)
LOW = _pyupm_ili9341.LOW
_pyupm_ili9341.DELAY_swigconstant(_pyupm_ili9341)
DELAY = _pyupm_ili9341.DELAY
_pyupm_ili9341.ILI9341_BLACK_swigconstant(_pyupm_ili9341)
ILI9341_BLACK = _pyupm_ili9341.ILI9341_BLACK
_pyupm_ili9341.ILI9341_NAVY_swigconstant(_pyupm_ili9341)
ILI9341_NAVY = _pyupm_ili9341.ILI9341_NAVY
_pyupm_ili9341.ILI9341_DARKGREEN_swigconstant(_pyupm_ili9341)
ILI9341_DARKGREEN = _pyupm_ili9341.ILI9341_DARKGREEN
_pyupm_ili9341.ILI9341_DARKCYAN_swigconstant(_pyupm_ili9341)
ILI9341_DARKCYAN = _pyupm_ili9341.ILI9341_DARKCYAN
_pyupm_ili9341.ILI9341_MAROON_swigconstant(_pyupm_ili9341)
ILI9341_MAROON = _pyupm_ili9341.ILI9341_MAROON
_pyupm_ili9341.ILI9341_PURPLE_swigconstant(_pyupm_ili9341)
ILI9341_PURPLE = _pyupm_ili9341.ILI9341_PURPLE
_pyupm_ili9341.ILI9341_OLIVE_swigconstant(_pyupm_ili9341)
ILI9341_OLIVE = _pyupm_ili9341.ILI9341_OLIVE
_pyupm_ili9341.ILI9341_LIGHTGREY_swigconstant(_pyupm_ili9341)
ILI9341_LIGHTGREY = _pyupm_ili9341.ILI9341_LIGHTGREY
_pyupm_ili9341.ILI9341_DARKGREY_swigconstant(_pyupm_ili9341)
ILI9341_DARKGREY = _pyupm_ili9341.ILI9341_DARKGREY
_pyupm_ili9341.ILI9341_BLUE_swigconstant(_pyupm_ili9341)
ILI9341_BLUE = _pyupm_ili9341.ILI9341_BLUE
_pyupm_ili9341.ILI9341_GREEN_swigconstant(_pyupm_ili9341)
ILI9341_GREEN = _pyupm_ili9341.ILI9341_GREEN
_pyupm_ili9341.ILI9341_CYAN_swigconstant(_pyupm_ili9341)
ILI9341_CYAN = _pyupm_ili9341.ILI9341_CYAN
_pyupm_ili9341.ILI9341_RED_swigconstant(_pyupm_ili9341)
ILI9341_RED = _pyupm_ili9341.ILI9341_RED
_pyupm_ili9341.ILI9341_MAGENTA_swigconstant(_pyupm_ili9341)
ILI9341_MAGENTA = _pyupm_ili9341.ILI9341_MAGENTA
_pyupm_ili9341.ILI9341_YELLOW_swigconstant(_pyupm_ili9341)
ILI9341_YELLOW = _pyupm_ili9341.ILI9341_YELLOW
_pyupm_ili9341.ILI9341_WHITE_swigconstant(_pyupm_ili9341)
ILI9341_WHITE = _pyupm_ili9341.ILI9341_WHITE
_pyupm_ili9341.ILI9341_ORANGE_swigconstant(_pyupm_ili9341)
ILI9341_ORANGE = _pyupm_ili9341.ILI9341_ORANGE
_pyupm_ili9341.ILI9341_GREENYELLOW_swigconstant(_pyupm_ili9341)
ILI9341_GREENYELLOW = _pyupm_ili9341.ILI9341_GREENYELLOW
_pyupm_ili9341.ILI9341_PINK_swigconstant(_pyupm_ili9341)
ILI9341_PINK = _pyupm_ili9341.ILI9341_PINK
[docs]class ILI9341(GFX):
"""
API for the ILI9342 LCD.
ID: ili9341
Name: SPI Based LCD
Category: display
Manufacturer: adafruit
Link:http://www.adafruit.com/product/2090
Connection: spi This module defines the interface for the ILI9341
display library
C++ includes: ili9341.hpp
"""
__swig_setmethods__ = {}
for _s in [GFX]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, ILI9341, name, value)
__swig_getmethods__ = {}
for _s in [GFX]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, ILI9341, name)
__repr__ = _swig_repr
def __init__(self, csLCD, csSD, dc, rst):
"""
ILI9341(int csLCD, int
csSD, int dc, int rst)
Instantiates an ILI9341 object
Parameters:
-----------
csLCD: LCD chip select pin
csSD: SD card select pin
dc: Data/command pin
rst: Reset pin
"""
this = _pyupm_ili9341.new_ILI9341(csLCD, csSD, dc, rst)
try:
self.this.append(this)
except Exception:
self.this = this
[docs] def name(self):
"""
std::string name()
Returns the name of the component
"""
return _pyupm_ili9341.ILI9341_name(self)
[docs] def initModule(self):
"""
void initModule()
Initializes GPIOs used to talk to the LCD
"""
return _pyupm_ili9341.ILI9341_initModule(self)
[docs] def configModule(self):
"""
void
configModule()
Configures the LCD driver chip via SPI
"""
return _pyupm_ili9341.ILI9341_configModule(self)
[docs] def setAddrWindow(self, x0, y0, x1, y1):
"""
void
setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1)
Sets the window size inside the screen where pixel data is written.
Concrete implementation from GFX interface.
Parameters:
-----------
x0: First coordinate
y0: First coordinate
x1: Second coordinate
y1: Second coordinate
"""
return _pyupm_ili9341.ILI9341_setAddrWindow(self, x0, y0, x1, y1)
[docs] def drawPixel(self, x, y, color):
"""
void
drawPixel(int16_t x, int16_t y, uint16_t color)
Sends a pixel color (RGB) to the driver chip. Concrete implementation
from GFX interface.
Parameters:
-----------
x: Axis on the horizontal scale
y: Axis on the vertical scale
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.ILI9341_drawPixel(self, x, y, color)
[docs] def drawFastVLine(self, x, y, h, color):
"""
void
drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Draws a vertical line using minimal SPI writes.
Parameters:
-----------
x: Axis on the horizontal scale to begin line
y: Axis on the vertical scale to begin line
h: Height of line in pixels
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.ILI9341_drawFastVLine(self, x, y, h, color)
[docs] def drawFastHLine(self, x, y, w, color):
"""
void
drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Draws a horizontal line using minimal SPI writes.
Parameters:
-----------
x: Axis on the horizontal scale to begin line
y: Axis on the vertical scale to begin line
w: Width of line in pixels
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.ILI9341_drawFastHLine(self, x, y, w, color)
[docs] def fillRect(self, x, y, w, h, color):
"""
void fillRect(int16_t
x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a filled rectangle.
Parameters:
-----------
x: Axis on the horizontal scale of upper-left corner
y: Axis on the vertical scale of upper-left corner
w: Width of rectangle in pixels
h: Height of rectangle in pixels
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.ILI9341_fillRect(self, x, y, w, h, color)
[docs] def fillScreen(self, color):
"""
void
fillScreen(uint16_t color)
Fill the screen with a single color.
Parameters:
-----------
color: RGB (16-bit) color (R[0-4], G[5-10], B[11-15]
"""
return _pyupm_ili9341.ILI9341_fillScreen(self, color)
[docs] def setRotation(self, r):
"""
void
setRotation(uint8_t r)
Sets the screen to one of four 90 deg rotations.
Parameters:
-----------
r: Rotation setting: 0, 1, 2, 3
"""
return _pyupm_ili9341.ILI9341_setRotation(self, r)
[docs] def invertDisplay(self, i):
"""
void
invertDisplay(bool i)
Invert colors on the display.
Parameters:
-----------
i: True or false to invert colors
"""
return _pyupm_ili9341.ILI9341_invertDisplay(self, i)
[docs] def color565(self, r, g, b):
"""
uint16_t
color565(uint8_t r, uint8_t g, uint8_t b)
Pass 8-bit R, G, B values and get back 16-bit packed color.
Parameters:
-----------
r: Red color 0-31
g: Green color 0-63
b: blue color 0-31
16-bit packed color (RGB) value
"""
return _pyupm_ili9341.ILI9341_color565(self, r, g, b)
[docs] def executeCMDList(self, addr):
"""
void
executeCMDList(const uint8_t *addr)
Executes a set of commands and data.
Parameters:
-----------
addr: Pointer to the start of the commands/data section
"""
return _pyupm_ili9341.ILI9341_executeCMDList(self, addr)
[docs] def writecommand(self, c):
"""
void
writecommand(uint8_t c)
Sends a command to the display driver via SPI.
Parameters:
-----------
c: Command to be written
"""
return _pyupm_ili9341.ILI9341_writecommand(self, c)
[docs] def writedata(self, d):
"""
void
writedata(uint8_t d)
Sends data to the display driver via SPI
Parameters:
-----------
d: Data to be written
"""
return _pyupm_ili9341.ILI9341_writedata(self, d)
[docs] def lcdCSOn(self):
"""
mraa::Result lcdCSOn()
Set LCD chip select to LOW
"""
return _pyupm_ili9341.ILI9341_lcdCSOn(self)
[docs] def lcdCSOff(self):
"""
mraa::Result
lcdCSOff()
Set LCD chip select to HIGH
"""
return _pyupm_ili9341.ILI9341_lcdCSOff(self)
[docs] def sdCSOn(self):
"""
mraa::Result sdCSOn()
Set SD card chip select to LOW
"""
return _pyupm_ili9341.ILI9341_sdCSOn(self)
[docs] def sdCSOff(self):
"""
mraa::Result sdCSOff()
Set SD card chip select to HIGH
"""
return _pyupm_ili9341.ILI9341_sdCSOff(self)
[docs] def dcHigh(self):
"""
mraa::Result dcHigh()
Set data/command line to HIGH
"""
return _pyupm_ili9341.ILI9341_dcHigh(self)
[docs] def dcLow(self):
"""
mraa::Result dcLow()
Set data/command line to LOW
"""
return _pyupm_ili9341.ILI9341_dcLow(self)
[docs] def rstHigh(self):
"""
mraa::Result rstHigh()
Set reset line to HIGH
"""
return _pyupm_ili9341.ILI9341_rstHigh(self)
[docs] def rstLow(self):
"""
mraa::Result rstLow()
Set reset line to LOW
"""
return _pyupm_ili9341.ILI9341_rstLow(self)
__swig_destroy__ = _pyupm_ili9341.delete_ILI9341
__del__ = lambda self: None
ILI9341_swigregister = _pyupm_ili9341.ILI9341_swigregister
ILI9341_swigregister(ILI9341)
# This file is compatible with both classic and new-style classes.