Hanna
Sourcecode Batteriemanagementsystem |
Graphic library configured for the SDT028ATFT LCD panel using the ILI9341 display controller. display controller. Mehr ...
#include "ili9341.h"
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
#define | gfx_color(r, g, b) gfx_ili9341_color(r, g, b) |
#define | gfx_copy_pixels_from_screen(pixels, count) ili9341_copy_pixels_from_screen(pixels, count) |
#define | gfx_copy_pixels_to_screen(pixels, count) ili9341_copy_pixels_to_screen(pixels, count) |
#define | gfx_copy_progmem_pixels_to_screen(pixels, count, swap) ili9341_copy_progmem_pixels_to_screen(pixels, count, swap) |
#define | gfx_draw_bitmap(bmp, x, y) gfx_generic_draw_bitmap(bmp, x, y) |
#define | gfx_draw_bitmap_tiled(bmp, x1, y1, x2, y2, tile_origin_x, tile_origin_y) |
#define | gfx_draw_circle(x, y, radius, color, octant_mask) gfx_generic_draw_circle(x, y, radius, color, octant_mask) |
#define | gfx_draw_filled_circle(x, y, radius, color, quadrant_mask) |
#define | gfx_draw_filled_rect(x, y, width, height, color) gfx_generic_draw_filled_rect(x, y, width, height, color) |
#define | gfx_draw_horizontal_line(x, y, length, color) gfx_generic_draw_horizontal_line(x, y, length, color) |
#define | gfx_draw_line(x1, y1, x2, y2, color) gfx_generic_draw_line(x1, y1, x2, y2, color) |
#define | gfx_draw_line_pixel(x, y, color) |
#define | gfx_draw_pixel(x, y, color) gfx_ili9341_draw_pixel(x, y, color) |
#define | gfx_draw_rect(x, y, width, height, color) gfx_generic_draw_rect(x, y, width, height, color) |
#define | gfx_draw_vertical_line(x, y, length, color) gfx_generic_draw_vertical_line(x, y, length, color) |
#define | gfx_duplicate_pixel(color, count) ili9341_duplicate_pixel(color, count) |
#define | gfx_get_pixel(x, y) gfx_ili9341_get_pixel(x, y) |
#define | gfx_get_pixmap(pixmap, map_width, map_x, map_y, x, y, width, height) |
#define | gfx_init() gfx_ili9341_init() |
#define | gfx_put_bitmap(bmp, map_x, map_y, x, y, width, height) gfx_generic_put_bitmap(bmp, map_x, map_y, x, y, width, height) |
#define | gfx_put_pixmap(pixmap, map_width, map_x, map_y, x, y, width, height) |
#define | gfx_set_bottom_right_limit(x, y) ili9341_set_bottom_right_limit(x, y) |
#define | gfx_set_ext_handler(ext_draw_handler) gfx_generic_set_ext_handler(ext_draw_handler) |
#define | gfx_set_limits(x1, y1, x2, y2) ili9341_set_limits(x1, y1, x2, y2) |
#define | gfx_set_orientation(flags) gfx_ili9341_set_orientation(flags) |
#define | gfx_set_top_left_limit(x, y) ili9341_set_top_left_limit(x, y) |
#define | gfx_sync() gfx_generic_sync() |
Funktionen | |
gfx_color_t | gfx_ili9341_color (uint8_t r, uint8_t g, uint8_t b) |
Generate native color value from R/G/B values. Mehr ... | |
void | gfx_ili9341_draw_line_pixel (gfx_coord_t x, gfx_coord_t y, gfx_color_t color) |
Draw a single pixel on the screen. Mehr ... | |
void | gfx_ili9341_draw_pixel (gfx_coord_t x, gfx_coord_t y, gfx_color_t color) |
Draw a single pixel on the screen. Mehr ... | |
gfx_color_t | gfx_ili9341_get_pixel (gfx_coord_t x, gfx_coord_t y) |
Get the color of a pixel on the display. Mehr ... | |
void | gfx_ili9341_init (void) |
Initialize the ili9341 display controller. Mehr ... | |
void | gfx_ili9341_set_orientation (uint8_t flags) |
Set display orientation. Mehr ... | |
Driver-specific Definitions | |
#define | GFX_COLOR(r, g, b) ILI9341_COLOR(r, g, b) |
Generate a display-native color value from constant RGB components. Mehr ... | |
#define | GFX_COLOR_INVALID GFX_COLOR(5, 5, 5) |
Value returned by gfx_get_pixel() for pixels outside clipping region. Mehr ... | |
#define | GFX_COLOR_TRANSPARENT GFX_COLOR(240, 0, 240) |
Value used as input to font functions to give a transparent background region. Mehr ... | |
typedef ili9341_color_t | gfx_color_t |
Data type for color values native to the display. | |
typedef ili9341_coord_t | gfx_coord_t |
Data type representing a coordinate on the screen. | |
Graphic library configured for the SDT028ATFT LCD panel using the ILI9341 display controller. display controller.
This files includes the correct header files for the graphics service
Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
Definiert in Datei gfx_ili9341.h.
#define GFX_COLOR | ( | r, | |
g, | |||
b | |||
) | ILI9341_COLOR(r, g, b) |
Generate a display-native color value from constant RGB components.
This macro does the same job as gfx_color(), except that the RGB values must be constant, and that it is usable as a static initializer.
Definiert in Zeile 60 der Datei gfx_ili9341.h.
#define gfx_color | ( | r, | |
g, | |||
b | |||
) | gfx_ili9341_color(r, g, b) |
ILI9341 display driver specific function, see gfx_ili9341_color
Definiert in Zeile 309 der Datei gfx_ili9341.h.
#define GFX_COLOR_INVALID GFX_COLOR(5, 5, 5) |
Value returned by gfx_get_pixel() for pixels outside clipping region.
It is not possible to define a color that is outside the color spectrum for the ILI9341 driver, hence use a dark color as an invalid color.
Definiert in Zeile 66 der Datei gfx_ili9341.h.
#define GFX_COLOR_TRANSPARENT GFX_COLOR(240, 0, 240) |
Value used as input to font functions to give a transparent background region.
It is not possible to define a color that is outside the color spectrum for the ILI9341 driver, hence use a very uncommon strong magenta color as transparency mask color.
Definiert in Zeile 73 der Datei gfx_ili9341.h.
#define gfx_copy_pixels_from_screen | ( | pixels, | |
count | |||
) | ili9341_copy_pixels_from_screen(pixels, count) |
ILI9341 display driver specific function, see ili9341_copy_pixels_from_screen
Definiert in Zeile 295 der Datei gfx_ili9341.h.
#define gfx_copy_pixels_to_screen | ( | pixels, | |
count | |||
) | ili9341_copy_pixels_to_screen(pixels, count) |
ILI9341 display driver specific function, see ili9341_copy_pixels_to_screen
Definiert in Zeile 288 der Datei gfx_ili9341.h.
#define gfx_copy_progmem_pixels_to_screen | ( | pixels, | |
count, | |||
swap | |||
) | ili9341_copy_progmem_pixels_to_screen(pixels, count, swap) |
ILI9341 display driver specific function available for ATmega and ATXmega devices, see ili9341_copy_progmem_pixels_to_screen
Definiert in Zeile 302 der Datei gfx_ili9341.h.
#define gfx_draw_bitmap | ( | bmp, | |
x, | |||
y | |||
) | gfx_generic_draw_bitmap(bmp, x, y) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_bitmap
Definiert in Zeile 232 der Datei gfx_ili9341.h.
#define gfx_draw_bitmap_tiled | ( | bmp, | |
x1, | |||
y1, | |||
x2, | |||
y2, | |||
tile_origin_x, | |||
tile_origin_y | |||
) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_bitmap_tiled
Definiert in Zeile 223 der Datei gfx_ili9341.h.
#define gfx_draw_circle | ( | x, | |
y, | |||
radius, | |||
color, | |||
octant_mask | |||
) | gfx_generic_draw_circle(x, y, radius, color, octant_mask) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_circle
Definiert in Zeile 185 der Datei gfx_ili9341.h.
#define gfx_draw_filled_circle | ( | x, | |
y, | |||
radius, | |||
color, | |||
quadrant_mask | |||
) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_filled_circle
Definiert in Zeile 192 der Datei gfx_ili9341.h.
#define gfx_draw_filled_rect | ( | x, | |
y, | |||
width, | |||
height, | |||
color | |||
) | gfx_generic_draw_filled_rect(x, y, width, height, color) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_filled_rect
Definiert in Zeile 178 der Datei gfx_ili9341.h.
#define gfx_draw_horizontal_line | ( | x, | |
y, | |||
length, | |||
color | |||
) | gfx_generic_draw_horizontal_line(x, y, length, color) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_horizontal_line
Definiert in Zeile 150 der Datei gfx_ili9341.h.
#define gfx_draw_line | ( | x1, | |
y1, | |||
x2, | |||
y2, | |||
color | |||
) | gfx_generic_draw_line(x1, y1, x2, y2, color) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_line
Definiert in Zeile 164 der Datei gfx_ili9341.h.
#define gfx_draw_line_pixel | ( | x, | |
y, | |||
color | |||
) |
ILI9341 display driver specific function, see gfx_ili9341_draw_line_pixel
Definiert in Zeile 263 der Datei gfx_ili9341.h.
#define gfx_draw_pixel | ( | x, | |
y, | |||
color | |||
) | gfx_ili9341_draw_pixel(x, y, color) |
ILI9341 display driver specific function, see gfx_ili9341_draw_pixel
Definiert in Zeile 257 der Datei gfx_ili9341.h.
#define gfx_draw_rect | ( | x, | |
y, | |||
width, | |||
height, | |||
color | |||
) | gfx_generic_draw_rect(x, y, width, height, color) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_rect
Definiert in Zeile 171 der Datei gfx_ili9341.h.
#define gfx_draw_vertical_line | ( | x, | |
y, | |||
length, | |||
color | |||
) | gfx_generic_draw_vertical_line(x, y, length, color) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_draw_vertical_line
Definiert in Zeile 157 der Datei gfx_ili9341.h.
#define gfx_duplicate_pixel | ( | color, | |
count | |||
) | ili9341_duplicate_pixel(color, count) |
ILI9341 display driver specific function, see ili9341_duplicate_pixel
Definiert in Zeile 245 der Datei gfx_ili9341.h.
#define gfx_get_pixel | ( | x, | |
y | |||
) | gfx_ili9341_get_pixel(x, y) |
ILI9341 display driver specific function, see gfx_ili9341_get_pixel
Definiert in Zeile 251 der Datei gfx_ili9341.h.
#define gfx_get_pixmap | ( | pixmap, | |
map_width, | |||
map_x, | |||
map_y, | |||
x, | |||
y, | |||
width, | |||
height | |||
) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_get_pixmap
Definiert in Zeile 200 der Datei gfx_ili9341.h.
#define gfx_init | ( | ) | gfx_ili9341_init() |
ILI9341 display driver specific function, see gfx_ili9341_init
Definiert in Zeile 321 der Datei gfx_ili9341.h.
#define gfx_put_bitmap | ( | bmp, | |
map_x, | |||
map_y, | |||
x, | |||
y, | |||
width, | |||
height | |||
) | gfx_generic_put_bitmap(bmp, map_x, map_y, x, y, width, height) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_put_bitmap
Definiert in Zeile 216 der Datei gfx_ili9341.h.
#define gfx_put_pixmap | ( | pixmap, | |
map_width, | |||
map_x, | |||
map_y, | |||
x, | |||
y, | |||
width, | |||
height | |||
) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_put_pixmap
Definiert in Zeile 208 der Datei gfx_ili9341.h.
#define gfx_set_bottom_right_limit | ( | x, | |
y | |||
) | ili9341_set_bottom_right_limit(x, y) |
ILI9341 display driver specific function, see ili9341_set_bottom_right_limit
Definiert in Zeile 276 der Datei gfx_ili9341.h.
#define gfx_set_ext_handler | ( | ext_draw_handler | ) | gfx_generic_set_ext_handler(ext_draw_handler) |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_set_ext_handler
Definiert in Zeile 238 der Datei gfx_ili9341.h.
#define gfx_set_limits | ( | x1, | |
y1, | |||
x2, | |||
y2 | |||
) | ili9341_set_limits(x1, y1, x2, y2) |
ILI9341 display driver specific function, see ili9341_set_limits
Definiert in Zeile 282 der Datei gfx_ili9341.h.
#define gfx_set_orientation | ( | flags | ) | gfx_ili9341_set_orientation(flags) |
ILI9341 display driver specific function, see gfx_ili9341_set_orientation
Definiert in Zeile 315 der Datei gfx_ili9341.h.
#define gfx_set_top_left_limit | ( | x, | |
y | |||
) | ili9341_set_top_left_limit(x, y) |
ILI9341 display driver specific function, see ili9341_set_top_left_limit
Definiert in Zeile 270 der Datei gfx_ili9341.h.
#define gfx_sync | ( | ) | gfx_generic_sync() |
ILI9341 display driver uses generic gfx implementation for this function. See gfx_generic_sync
Definiert in Zeile 327 der Datei gfx_ili9341.h.
gfx_color_t gfx_ili9341_color | ( | uint8_t | r, |
uint8_t | g, | ||
uint8_t | b | ||
) |
Generate native color value from R/G/B values.
Converts 8-bit R/G/B values to a color value native to the display.
The macro GFX_COLOR does the same, only allows the preprocessor to handle the calculations.
r | 8-bit red value. |
g | 8-bit green value. |
b | 8-bit blue value. |
Definiert in Zeile 86 der Datei gfx_ili9341.c.
void gfx_ili9341_draw_line_pixel | ( | gfx_coord_t | x, |
gfx_coord_t | y, | ||
gfx_color_t | color | ||
) |
Draw a single pixel on the screen.
This function draws a single pixel on screen only setting top limit which makes it more suitable for line drawing. If outside the clipping region, nothing is drawn.
x | X coordinate of the pixel to be drawn. |
y | Y coordinate of the pixel to be drawn. |
color | Color value of the pixel in display native format. |
Definiert in Zeile 123 der Datei gfx_ili9341.c.
void gfx_ili9341_draw_pixel | ( | gfx_coord_t | x, |
gfx_coord_t | y, | ||
gfx_color_t | color | ||
) |
Draw a single pixel on the screen.
Draw a single pixel on screen setting top and bottom limits. If outside the clipping region, nothing is drawn.
x | X coordinate of the pixel to be drawn. |
y | Y coordinate of the pixel to be drawn. |
color | Color value of the pixel in display native format. |
Definiert in Zeile 109 der Datei gfx_ili9341.c.
gfx_color_t gfx_ili9341_get_pixel | ( | gfx_coord_t | x, |
gfx_coord_t | y | ||
) |
Get the color of a pixel on the display.
x | X coordinate of the pixel to be sampled. |
y | Y coordinate of the pixel to be sampled. |
Definiert in Zeile 91 der Datei gfx_ili9341.c.
void gfx_ili9341_init | ( | void | ) |
Initialize the ili9341 display controller.
This function will be called when calling gfx_init. It will draw a black background to the display and enable the display backlight if available.
Definiert in Zeile 138 der Datei gfx_ili9341.c.
void gfx_ili9341_set_orientation | ( | uint8_t | flags | ) |
Set display orientation.
Set the display orientation
flags |
Definiert in Zeile 64 der Datei gfx_ili9341.c.