ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts  1.0
ESP8266ILI9341DisplayProject
Functions
ili9341_adafruit.c File Reference
#include "user_config.h"
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include "display/font.h"
#include "display/ili9341.h"
#include "3rd_party/ili9341_adafruit.h"

Go to the source code of this file.

Functions

MEMSPACE void tft_configRegister (void)
 Initialize ILI9341 display. More...
 
MEMSPACE void tft_drawBitmap (window *win, int16_t x, int16_t y, const uint16_t *bitmap, int16_t w, int16_t h)
 Draw bitmap Replaced by tft_writeRect() More...
 
MEMSPACE void tft_drawCircle (window *win, int16_t x0, int16_t y0, int16_t r, uint16_t color)
 Draw a circle outline. More...
 
MEMSPACE void tft_drawCircleHelper (window *win, int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color)
 Draw a circle helper. More...
 
MEMSPACE void tft_fillCircleHelper (window *win, int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
 Fill circle helper. More...
 
MEMSPACE void tft_fillCircle (window *win, int16_t x0, int16_t y0, int16_t r, uint16_t color)
 Fill circle. More...
 
MEMSPACE void tft_drawRect (window *win, int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
 Draw a rectangle. More...
 
MEMSPACE void tft_drawRoundRect (window *win, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color)
 Draw a rounded rectangle. More...
 
MEMSPACE void tft_fillRoundRect (window *win, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color)
 Fill a rounded rectangle. More...
 
MEMSPACE void tft_drawTriangle (window *win, int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
 Draw a triangle. More...
 
MEMSPACE void tft_fillTriangle (window *win, int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
 Fill a triangle. More...
 

Detailed Description

Copyright (c) 2013 Adafruit Industries. All rights reserved.
Minor Revisions by 2015 Mike Gore to add multiple window support
See also
https://github.com/adafruit/Adafruit-GFX-Library

Definition in file ili9341_adafruit.c.

Function Documentation

MEMSPACE void tft_configRegister ( void  )

Initialize ILI9341 display.

This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions).

Adafruit invests time and resources providing this open source code, please support Adafruit & open-source hardware by purchasing products from Adafruit!

Copyright (c) 2013 Adafruit Industries. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Returns
void

Definition at line 57 of file ili9341_adafruit.c.

Referenced by tft_init().

MEMSPACE void tft_drawBitmap ( window win,
int16_t  x,
int16_t  y,
const uint16_t bitmap,
int16_t  w,
int16_t  h 
)

Draw bitmap Replaced by tft_writeRect()

Parameters
[in]*winwindow structure
[in]xX offset
[in]yY offset
[in]*bitmapbitmap
[in]wWidth of bitmap
[in]hHeight of bitmap
Returns
void

Definition at line 184 of file ili9341_adafruit.c.

MEMSPACE void tft_drawCircle ( window win,
int16_t  x0,
int16_t  y0,
int16_t  r,
uint16_t  color 
)

Draw a circle outline.

Parameters
[in]*winwindow structure
[in]x0X offset
[in]y0Y offset
[in]rRadius of circle
[in]colorColor
Returns
void

Definition at line 201 of file ili9341_adafruit.c.

Referenced by user_loop().

MEMSPACE void tft_drawCircleHelper ( window win,
int16_t  x0,
int16_t  y0,
int16_t  r,
uint8_t  cornername,
uint16_t  color 
)

Draw a circle helper.

Parameters
[in]*winwindow structure
[in]x0X offset
[in]y0Y offset
[in]rRadius of circle
[in]cornernameCorner to draw
[in]colorColor
Returns
void

Definition at line 248 of file ili9341_adafruit.c.

Referenced by tft_drawRoundRect().

MEMSPACE void tft_drawRect ( window win,
int16_t  x,
int16_t  y,
int16_t  w,
int16_t  h,
uint16_t  color 
)

Draw a rectangle.

Parameters
[in]*winwindow structure
[in]xX offset
[in]yY offset
[in]wWidth
[in]hHeight
[in]colorColor
Returns
void

Definition at line 363 of file ili9341_adafruit.c.

MEMSPACE void tft_drawRoundRect ( window win,
int16_t  x,
int16_t  y,
int16_t  w,
int16_t  h,
int16_t  r,
uint16_t  color 
)

Draw a rounded rectangle.

Parameters
[in]*winwindow structure
[in]xX offset
[in]yY offset
[in]wWidth
[in]hHeight
[in]rRadius
[in]colorColor
Returns
void

Definition at line 384 of file ili9341_adafruit.c.

MEMSPACE void tft_drawTriangle ( window win,
int16_t  x0,
int16_t  y0,
int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2,
uint16_t  color 
)

Draw a triangle.

Parameters
[in]*winwindow structure
[in]x0X0 offset
[in]y0Y0 offset
[in]x1X1 offset
[in]y1Y1 offset
[in]x2X2 offset
[in]y2Y2 offset
[in]colorColor
Returns
void

Definition at line 437 of file ili9341_adafruit.c.

MEMSPACE void tft_fillCircle ( window win,
int16_t  x0,
int16_t  y0,
int16_t  r,
uint16_t  color 
)

Fill circle.

Parameters
[in]*winwindow structure
[in]x0X offset
[in]y0Y offset
[in]rRadius
[in]colorColor
Returns
void

Definition at line 346 of file ili9341_adafruit.c.

MEMSPACE void tft_fillCircleHelper ( window win,
int16_t  x0,
int16_t  y0,
int16_t  r,
uint8_t  cornername,
int16_t  delta,
uint16_t  color 
)

Fill circle helper.

Parameters
[in]*winwindow structure
[in]x0X offset
[in]y0Y offset
[in]rRadius of circle
[in]cornernameCorner to draw
[in]deltaX or X offset
[in]colorColor
Returns
void

Definition at line 302 of file ili9341_adafruit.c.

Referenced by tft_fillCircle(), and tft_fillRoundRect().

MEMSPACE void tft_fillRoundRect ( window win,
int16_t  x,
int16_t  y,
int16_t  w,
int16_t  h,
int16_t  r,
uint16_t  color 
)

Fill a rounded rectangle.

Parameters
[in]*winwindow structure
[in]xX offset
[in]yY offset
[in]wWidth
[in]hHeight
[in]rRadius
[in]colorColor
Returns
void

Definition at line 414 of file ili9341_adafruit.c.

MEMSPACE void tft_fillTriangle ( window win,
int16_t  x0,
int16_t  y0,
int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2,
uint16_t  color 
)

Fill a triangle.

Parameters
[in]*winwindow structure
[in]x0X0 offset
[in]y0Y0 offset
[in]x1X1 offset
[in]y1Y1 offset
[in]x2X2 offset
[in]y2Y2 offset
[in]colorColor
Returns
void

Definition at line 458 of file ili9341_adafruit.c.