This is hardware specific configuration that configures the graphical service for use with the ET024006DHU TFT display.
All the drawing functionality in this configuration is provided by the Generic Implementation of Graphics Primitives driver. This configuration includes information about the panel size, data type used for coordinates and color and functionality to convert RGB color to the color format native to the display.
Macros | |
#define | GFX_COLOR(r, g, b) |
#define | gfx_color(r, g, b) gfx_et024006dhu_color(r, g, b) |
ET024006DHU display driver specific function, see gfx_et024006dhu_color. More... | |
#define | GFX_COLOR_INVALID GFX_COLOR(0, 0, 0) |
#define | GFX_COLOR_TRANSPARENT GFX_COLOR(254, 0, 0) |
#define | gfx_copy_pixels_from_screen(pixels, count) et024006_CopyPixelsFromScreen(pixels, count) |
ET024006DHU display driver specific function, see et024006_CopyPixelsFromScreen. More... | |
#define | gfx_copy_pixels_to_screen(pixels, count) et024006_CopyPixelsToScreen(pixels, count) |
ET024006DHU display driver specific function, see et024006_CopyPixelsToScreen. More... | |
#define | gfx_copy_progmem_pixels_to_screen(pixels, count) et024006_CopyPixelsToScreen(pixels, count) |
ET024006DHU display driver specific function available for ATmega and ATXmega devices, see et024006_CopyPixelsToScreen. More... | |
#define | gfx_draw_bitmap(bmp, x, y) gfx_generic_draw_bitmap(bmp, x, y) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_bitmap_tiled(bmp, x1, y1, x2, y2, tile_origin_x, tile_origin_y) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_circle(x, y, radius, color, octant_mask) gfx_generic_draw_circle(x, y, radius, color, octant_mask) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_filled_circle(x, y, radius, color, quadrant_mask) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_filled_rect(x, y, width, height, color) gfx_generic_draw_filled_rect(x, y, width, height, color) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_horizontal_line(x, y, length, color) gfx_generic_draw_horizontal_line(x, y, length, color) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_line(x1, y1, x2, y2, color) gfx_generic_draw_line(x1, y1, x2, y2, color) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_line_pixel(x, y, color) gfx_et024006dhu_draw_line_pixel(x, y, color) |
ET024006DHU display driver specific function, see gfx_et024006dhu_draw_line_pixel. More... | |
#define | gfx_draw_pixel(x, y, color) gfx_et024006dhu_draw_pixel(x, y, color) |
ET024006DHU display driver specific function, see gfx_et024006dhu_draw_pixel. More... | |
#define | gfx_draw_rect(x, y, width, height, color) gfx_generic_draw_rect(x, y, width, height, color) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_vertical_line(x, y, length, color) gfx_generic_draw_vertical_line(x, y, length, color) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_duplicate_pixel(color, count) et024006_DuplicatePixel(color, count) |
ET024006DHU display driver specific function, see et024006_DuplicatePixel. More... | |
#define | gfx_get_pixel(x, y) gfx_et024006dhu_get_pixel(x, y) |
ET024006DHU display driver specific function, see gfx_et024006dhu_get_pixel. More... | |
#define | gfx_get_pixmap(pixmap, map_width, map_x, map_y, x, y, width, height) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_init() gfx_et024006dhu_init() |
ET024006DHU display driver specific function, see gfx_et024006dhu_init() More... | |
#define | GFX_PANELHEIGHT ET024006_HEIGHT |
#define | GFX_PANELWIDTH ET024006_WIDTH |
#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) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_put_pixmap(pixmap, map_width, map_x, map_y, x, y, width, height) |
ET024006DHU display driver uses generic gfx implementation for this function. More... | |
#define | gfx_set_bottom_right_limit(x, y) et024006_SetQuickLimits2(x, y) |
ET024006DHU display driver specific function, see et024006_SetQuickLimits2. More... | |
#define | gfx_set_limits(x1, y1, x2, y2) et024006_SetLimits(x1, y1, x2, y2) |
ET024006DHU display driver specific function, see et024006_SetLimits. More... | |
#define | gfx_set_orientation(flags) gfx_et024006dhu_set_orientation(flags) |
ET024006DHU display driver specific function, see gfx_et024006dhu_set_orientation. More... | |
#define | gfx_set_top_left_limit(x, y) et024006_SetQuickLimits(x, y) |
ET024006DHU display driver specific function, see et024006_SetQuickLimits. More... | |
Typedefs | |
typedef et024006_color_t | gfx_color_t |
typedef uint16_t | gfx_coord_t |
Functions | |
gfx_color_t | gfx_et024006dhu_color (uint8_t r, uint8_t g, uint8_t b) |
Generate native color value from R/G/B values. More... | |
void | gfx_et024006dhu_draw_line_pixel (gfx_coord_t x, gfx_coord_t y, gfx_color_t color) |
Draw a single pixel on the screen. More... | |
void | gfx_et024006dhu_draw_pixel (gfx_coord_t x, gfx_coord_t y, gfx_color_t color) |
Draw a single pixel on the screen. More... | |
gfx_color_t | gfx_et024006dhu_get_pixel (gfx_coord_t x, gfx_coord_t y) |
Get the color of a pixel on the display. More... | |
void | gfx_et024006dhu_init (void) |
Initialize the et024006dhu display controller. More... | |
void | gfx_et024006dhu_set_orientation (uint8_t flags) |
Set display orientation. More... | |
gfx_coord_t | gfx_height |
Current height of screen. More... | |
gfx_coord_t | gfx_width |
Current width of screen. More... | |
gfx_coord_t | gfx_min_x |
Minimum X of current clipping region. More... | |
gfx_coord_t | gfx_min_y |
Maximum Y of current clipping region. More... | |
gfx_coord_t | gfx_max_x |
Minimum X of current clipping region. More... | |
gfx_coord_t | gfx_max_y |
Maximum Y of current clipping region. More... | |
#define GFX_COLOR | ( | r, | |
g, | |||
b | |||
) |
#define gfx_color | ( | r, | |
g, | |||
b | |||
) | gfx_et024006dhu_color(r, g, b) |
ET024006DHU display driver specific function, see gfx_et024006dhu_color.
#define GFX_COLOR_INVALID GFX_COLOR(0, 0, 0) |
#define GFX_COLOR_TRANSPARENT GFX_COLOR(254, 0, 0) |
ET024006DHU display driver specific function, see et024006_CopyPixelsFromScreen.
ET024006DHU display driver specific function, see et024006_CopyPixelsToScreen.
#define gfx_copy_progmem_pixels_to_screen | ( | pixels, | |
count | |||
) | et024006_CopyPixelsToScreen(pixels, count) |
ET024006DHU display driver specific function available for ATmega and ATXmega devices, see et024006_CopyPixelsToScreen.
#define gfx_draw_bitmap | ( | bmp, | |
x, | |||
y | |||
) | gfx_generic_draw_bitmap(bmp, x, y) |
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_bitmap_tiled | ( | bmp, | |
x1, | |||
y1, | |||
x2, | |||
y2, | |||
tile_origin_x, | |||
tile_origin_y | |||
) |
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_circle | ( | x, | |
y, | |||
radius, | |||
color, | |||
octant_mask | |||
) | gfx_generic_draw_circle(x, y, radius, color, octant_mask) |
ET024006DHU display driver uses generic gfx implementation for this function.
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_filled_rect | ( | x, | |
y, | |||
width, | |||
height, | |||
color | |||
) | gfx_generic_draw_filled_rect(x, y, width, height, color) |
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_horizontal_line | ( | x, | |
y, | |||
length, | |||
color | |||
) | gfx_generic_draw_horizontal_line(x, y, length, color) |
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_line | ( | x1, | |
y1, | |||
x2, | |||
y2, | |||
color | |||
) | gfx_generic_draw_line(x1, y1, x2, y2, color) |
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_line_pixel | ( | x, | |
y, | |||
color | |||
) | gfx_et024006dhu_draw_line_pixel(x, y, color) |
ET024006DHU display driver specific function, see gfx_et024006dhu_draw_line_pixel.
#define gfx_draw_pixel | ( | x, | |
y, | |||
color | |||
) | gfx_et024006dhu_draw_pixel(x, y, color) |
ET024006DHU display driver specific function, see gfx_et024006dhu_draw_pixel.
#define gfx_draw_rect | ( | x, | |
y, | |||
width, | |||
height, | |||
color | |||
) | gfx_generic_draw_rect(x, y, width, height, color) |
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_draw_vertical_line | ( | x, | |
y, | |||
length, | |||
color | |||
) | gfx_generic_draw_vertical_line(x, y, length, color) |
ET024006DHU display driver uses generic gfx implementation for this function.
ET024006DHU display driver specific function, see et024006_DuplicatePixel.
#define gfx_get_pixel | ( | x, | |
y | |||
) | gfx_et024006dhu_get_pixel(x, y) |
ET024006DHU display driver specific function, see gfx_et024006dhu_get_pixel.
ET024006DHU display driver uses generic gfx implementation for this function.
#define gfx_init | ( | ) | gfx_et024006dhu_init() |
ET024006DHU display driver specific function, see gfx_et024006dhu_init()
#define GFX_PANELHEIGHT ET024006_HEIGHT |
Referenced by gfx_et024006dhu_init().
#define GFX_PANELWIDTH ET024006_WIDTH |
Referenced by gfx_et024006dhu_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) |
ET024006DHU display driver uses generic gfx implementation for this function.
ET024006DHU display driver uses generic gfx implementation for this function.
ET024006DHU display driver specific function, see et024006_SetQuickLimits2.
#define gfx_set_limits | ( | x1, | |
y1, | |||
x2, | |||
y2 | |||
) | et024006_SetLimits(x1, y1, x2, y2) |
ET024006DHU display driver specific function, see et024006_SetLimits.
#define gfx_set_orientation | ( | flags | ) | gfx_et024006dhu_set_orientation(flags) |
ET024006DHU display driver specific function, see gfx_et024006dhu_set_orientation.
ET024006DHU display driver specific function, see et024006_SetQuickLimits.
typedef et024006_color_t gfx_color_t |
typedef uint16_t gfx_coord_t |
gfx_color_t gfx_et024006dhu_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. |
References GFX_COLOR.
void gfx_et024006dhu_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. |
void gfx_et024006dhu_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. |
gfx_color_t gfx_et024006dhu_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. |
References GFX_COLOR_INVALID, gfx_max_x, gfx_max_y, gfx_min_x, and gfx_min_y.
void gfx_et024006dhu_init | ( | void | ) |
Initialize the et024006dhu display controller.
This function will be called when calling gfx_init. It will draw a black bacground to the display and enable the display backlight if available.
References GFX_COLOR, gfx_draw_filled_rect, gfx_height, GFX_PANELHEIGHT, GFX_PANELWIDTH, gfx_set_clipping(), gfx_width, IOPORT_DIR_OUTPUT, ioport_enable_pin(), ioport_set_pin_dir(), ioport_set_pin_level(), sysclk_get_cpu_hz(), and sysclk_get_pbb_hz().
void gfx_et024006dhu_set_orientation | ( | uint8_t | flags | ) |
Set display orientation.
Set the display orientation
flags |
gfx_coord_t gfx_height |
Current height of screen.
gfx_coord_t gfx_max_x |
Minimum X of current clipping region.
gfx_coord_t gfx_max_y |
Maximum Y of current clipping region.
gfx_coord_t gfx_min_x |
Minimum X of current clipping region.
gfx_coord_t gfx_min_y |
Maximum Y of current clipping region.
gfx_coord_t gfx_width |
Current width of screen.