ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
1.0
ESP8266ILI9341DisplayProject
|
#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... | |
Definition in file ili9341_adafruit.c.
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:
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.
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()
[in] | *win | window structure |
[in] | x | X offset |
[in] | y | Y offset |
[in] | *bitmap | bitmap |
[in] | w | Width of bitmap |
[in] | h | Height of bitmap |
Definition at line 184 of file ili9341_adafruit.c.
Draw a circle outline.
[in] | *win | window structure |
[in] | x0 | X offset |
[in] | y0 | Y offset |
[in] | r | Radius of circle |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x0 | X offset |
[in] | y0 | Y offset |
[in] | r | Radius of circle |
[in] | cornername | Corner to draw |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x | X offset |
[in] | y | Y offset |
[in] | w | Width |
[in] | h | Height |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x | X offset |
[in] | y | Y offset |
[in] | w | Width |
[in] | h | Height |
[in] | r | Radius |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x0 | X0 offset |
[in] | y0 | Y0 offset |
[in] | x1 | X1 offset |
[in] | y1 | Y1 offset |
[in] | x2 | X2 offset |
[in] | y2 | Y2 offset |
[in] | color | Color |
Definition at line 437 of file ili9341_adafruit.c.
Fill circle.
[in] | *win | window structure |
[in] | x0 | X offset |
[in] | y0 | Y offset |
[in] | r | Radius |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x0 | X offset |
[in] | y0 | Y offset |
[in] | r | Radius of circle |
[in] | cornername | Corner to draw |
[in] | delta | X or X offset |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x | X offset |
[in] | y | Y offset |
[in] | w | Width |
[in] | h | Height |
[in] | r | Radius |
[in] | color | Color |
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.
[in] | *win | window structure |
[in] | x0 | X0 offset |
[in] | y0 | Y0 offset |
[in] | x1 | X1 offset |
[in] | y1 | Y1 offset |
[in] | x2 | X2 offset |
[in] | y2 | Y2 offset |
[in] | color | Color |
Definition at line 458 of file ili9341_adafruit.c.