This is hardware specific configuration that configures the graphical service for use with the ILI93XX display controller 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) gfx_ili93xx_color(r, g, b) |
ILI93XX display driver specific function, see gfx_ili93xx_color. More... | |
#define | gfx_copy_pixels_from_screen(pixels, count) ili93xx_copy_pixels_from_screen(pixels, count) |
ILI93XX display driver specific function, see ili93xx_copy_pixels_from_screen. More... | |
#define | gfx_copy_pixels_to_screen(pixels, count) ili93xx_copy_pixels_to_screen(pixels, count) |
ILI93XX display driver specific function, see ili93xx_copy_pixels_to_screen. More... | |
#define | gfx_copy_progmem_pixels_to_screen(pixels, count) ili93xx_copy_raw_pixel_24bits_to_screen(pixels, count) |
ILI93XX display driver specific function available for ATmega and ATXmega devices, see ili93xx_copy_progmem_pixels_to_screen. More... | |
#define | gfx_draw_bitmap(bmp, x, y) gfx_generic_draw_bitmap(bmp, x, y) |
ILI93XX 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) |
ILI93XX display driver uses generic gfx implementation for this function. More... | |
#define | gfx_draw_line_pixel(x, y, color) |
ILI93XX display driver specific function, see gfx_ili93xx_draw_line_pixel. More... | |
#define | gfx_draw_pixel(x, y, color) gfx_ili93xx_draw_pixel(x, y, color) |
ILI93XX display driver specific function, see gfx_ili93xx_draw_pixel. More... | |
#define | gfx_duplicate_pixel(color, count) ili93xx_duplicate_pixel(color, count) |
ILI93XX display driver specific function, see ili93xx_duplicate_pixel. More... | |
#define | gfx_get_pixel(x, y) gfx_ili93xx_get_pixel(x, y) |
ILI93XX display driver specific function, see gfx_ili93xx_get_pixel. More... | |
#define | gfx_init() gfx_ili93xx_init() |
ILI93XX display driver specific function, see gfx_ili93xx_init. More... | |
#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) |
ILI93XX display driver uses generic gfx implementation for this function. More... | |
#define | gfx_set_bottom_right_limit(x, y) ili93xx_set_bottom_right_limit(x, y) |
ILI93XX display driver specific function, see ili93xx_set_bottom_right_limit. More... | |
#define | gfx_set_ext_handler(ext_draw_handler) gfx_generic_set_ext_handler(ext_draw_handler) |
ILI93XX display driver uses generic gfx implementation for this function. More... | |
#define | gfx_set_limits(x1, y1, x2, y2) ili93xx_set_limits(x1, y1, x2, y2) |
ILI93XX display driver specific function, see ili93xx_set_limits. More... | |
#define | gfx_set_orientation(flags) gfx_ili93xx_set_orientation(flags) |
ILI93XX display driver specific function, see gfx_ili93xx_set_orientation. More... | |
#define | gfx_set_top_left_limit(x, y) ili93xx_set_top_left_limit(x, y) |
ILI93XX display driver specific function, see ili93xx_set_top_left_limit. More... | |
#define | gfx_sync() gfx_generic_sync() |
ILI93XX display driver uses generic gfx implementation for this function. More... | |
Functions | |
gfx_color_t | gfx_ili93xx_color (uint8_t r, uint8_t g, uint8_t b) |
Generate native color value from R/G/B values. More... | |
void | gfx_ili93xx_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_ili93xx_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_ili93xx_get_pixel (gfx_coord_t x, gfx_coord_t y) |
Get the color of a pixel on the display. More... | |
void | gfx_ili93xx_init (void) |
Initialize the ili93xx display controller. More... | |
void | gfx_ili93xx_set_orientation (uint8_t flags) |
Set display orientation. More... | |
#define | ILI93XX_LCD_CS 1 |
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... | |
Graphics Drawing Primitives | |
#define | gfx_draw_horizontal_line(x, y, length, color) gfx_generic_draw_horizontal_line(x, y, length, color) |
Draw a horizontal line, one pixel wide. More... | |
#define | gfx_draw_vertical_line(x, y, length, color) gfx_generic_draw_vertical_line(x, y, length, color) |
Draw a vertical line, one pixel wide. More... | |
#define | gfx_draw_line(x1, y1, x2, y2, color) gfx_generic_draw_line(x1, y1, x2, y2, color) |
Draw a line between two arbitrary points. More... | |
#define | gfx_draw_rect(x, y, width, height, color) gfx_generic_draw_rect(x, y, width, height, color) |
Draw an outline of a rectangle. More... | |
#define | gfx_draw_filled_rect(x, y, width, height, color) gfx_generic_draw_filled_rect(x, y, width, height, color) |
Draw a filled rectangle. More... | |
#define | gfx_draw_circle(x, y, radius, color, octant_mask) gfx_generic_draw_circle(x, y, radius, color, octant_mask) |
Draw an outline of a circle or arc. More... | |
#define | gfx_draw_filled_circle(x, y, radius, color, quadrant_mask) |
Draw a filled circle or sector. More... | |
#define | gfx_get_pixmap(pixmap, map_width, map_x, map_y, x, y, width, height) |
Read a rectangular block of pixels from the screen into data memory. More... | |
#define | gfx_put_pixmap(pixmap, map_width, map_x, map_y, x, y, width, height) |
Write a rectangular block of pixels stored in data memory to the screen. More... | |
#define gfx_color | ( | r, | |
g, | |||
b | |||
) | gfx_ili93xx_color(r, g, b) |
ILI93XX display driver specific function, see gfx_ili93xx_color.
#define gfx_copy_pixels_from_screen | ( | pixels, | |
count | |||
) | ili93xx_copy_pixels_from_screen(pixels, count) |
ILI93XX display driver specific function, see ili93xx_copy_pixels_from_screen.
#define gfx_copy_pixels_to_screen | ( | pixels, | |
count | |||
) | ili93xx_copy_pixels_to_screen(pixels, count) |
ILI93XX display driver specific function, see ili93xx_copy_pixels_to_screen.
#define gfx_copy_progmem_pixels_to_screen | ( | pixels, | |
count | |||
) | ili93xx_copy_raw_pixel_24bits_to_screen(pixels, count) |
ILI93XX display driver specific function available for ATmega and ATXmega devices, see ili93xx_copy_progmem_pixels_to_screen.
#define gfx_draw_bitmap | ( | bmp, | |
x, | |||
y | |||
) | gfx_generic_draw_bitmap(bmp, x, y) |
ILI93XX 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 | |||
) |
ILI93XX 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) |
Draw an outline of a circle or arc.
ILI93XX display driver uses generic gfx implementation for this function.
The radius is the distance from the center to the circumference, which means that the total width or height of a circle will be (radius*2+1).
The octant_mask parameter is a bitmask that decides which octants of the circle to draw. Use the GFX_OCTANTn, GFX_QUADRANTn, GFX_xHALF and GFX_WHOLE constants and OR them together if required. Radius equal to zero gives a single pixel.
x | X coordinate of center. |
y | Y coordinate of center. |
radius | Circle radius in pixels. |
color | Circle color in display native format. |
octant_mask | Bitmask indicating which octants to draw. |
Referenced by wtk_radio_button_handler().
#define gfx_draw_filled_circle | ( | x, | |
y, | |||
radius, | |||
color, | |||
quadrant_mask | |||
) |
Draw a filled circle or sector.
ILI93XX display driver uses generic gfx implementation for this function.
The radius is the distance from the center to the circumference, which means that the total width or height of a circle will be (radius*2+1).
The quadrant_mask parameter is a bitmask that decides which quadrants of the circle to draw. Use the GFX_QUADRANTn, GFX_xHALF and GFX_WHOLE constants and OR them together if required. Radius equal to zero gives a single pixel.
x | X coordinate of center. |
y | Y coordinate of center. |
radius | Circle radius in pixels. |
color | Circle color in display native format. |
quadrant_mask | Bitmask indicating which quadrants to draw. |
See gfx_generic_draw_filled_circle
Referenced by wtk_continue_drag(), wtk_frame_handler(), wtk_radio_button_handler(), and wtk_start_drag().
#define gfx_draw_filled_rect | ( | x, | |
y, | |||
width, | |||
height, | |||
color | |||
) | gfx_generic_draw_filled_rect(x, y, width, height, color) |
Draw a filled rectangle.
ILI93XX display driver uses generic gfx implementation for this function.
x | X coordinate of the left side. |
y | Y coordinate of the top side. |
width | Width of the rectangle. |
height | Height of the rectangle. |
color | Color of the rectangle, in display native format. |
See gfx_generic_draw_filled_rect
Referenced by app_widget_fft_on(), clear_calibration_point(), demo_qtouch_event_handler(), draw_calibration_point(), gfx_draw_char(), gfx_generic_draw_bitmap_tiled(), gfx_generic_draw_horizontal_line(), gfx_generic_draw_vertical_line(), gfx_generic_put_bitmap(), gfx_ili93xx_init(), gui_print_q15_bar(), gui_print_q15_signal(), rtouch_calibrate(), win_hide(), wtk_button_handler(), wtk_check_box_handler(), wtk_frame_handler(), wtk_progress_bar_handler(), and wtk_slider_handler().
#define gfx_draw_horizontal_line | ( | x, | |
y, | |||
length, | |||
color | |||
) | gfx_generic_draw_horizontal_line(x, y, length, color) |
Draw a horizontal line, one pixel wide.
ILI93XX display driver uses generic gfx implementation for this function.
x | X coordinate of leftmost pixel. |
y | Y coordinate of the line. |
length | Length of the line in pixels. |
color | Color of the line, in display native format. |
See gfx_generic_draw_horizontal_line
Referenced by gfx_generic_draw_rect().
#define gfx_draw_line | ( | x1, | |
y1, | |||
x2, | |||
y2, | |||
color | |||
) | gfx_generic_draw_line(x1, y1, x2, y2, color) |
Draw a line between two arbitrary points.
ILI93XX display driver uses generic gfx implementation for this function.
x1 | Start X coordinate. |
y1 | Start Y coordinate. |
x2 | End X coordinate. |
y2 | End Y coordinate. |
color | Color of the line, in display native format. |
Referenced by gui_print_q15_bar(), gui_print_q15_signal(), wtk_plot_draw(), and wtk_plot_grid_draw().
#define gfx_draw_line_pixel | ( | x, | |
y, | |||
color | |||
) |
ILI93XX display driver specific function, see gfx_ili93xx_draw_line_pixel.
#define gfx_draw_pixel | ( | x, | |
y, | |||
color | |||
) | gfx_ili93xx_draw_pixel(x, y, color) |
ILI93XX display driver specific function, see gfx_ili93xx_draw_pixel.
#define gfx_draw_rect | ( | x, | |
y, | |||
width, | |||
height, | |||
color | |||
) | gfx_generic_draw_rect(x, y, width, height, color) |
Draw an outline of a rectangle.
ILI93XX display driver uses generic gfx implementation for this function.
x | X coordinate of the left side. |
y | Y coordinate of the top side. |
width | Width of the rectangle. |
height | Height of the rectangle. |
color | Color of the rectangle, in display native format. |
Referenced by app_widget_launch_qtouch(), demo_qtouch_event_handler(), wtk_button_handler(), wtk_check_box_handler(), wtk_icon_button_handler(), wtk_plot_handler(), wtk_progress_bar_handler(), and wtk_slider_handler().
#define gfx_draw_vertical_line | ( | x, | |
y, | |||
length, | |||
color | |||
) | gfx_generic_draw_vertical_line(x, y, length, color) |
Draw a vertical line, one pixel wide.
ILI93XX display driver uses generic gfx implementation for this function.
x | X coordinate of the line. |
y | Y coordinate of the topmost pixel. |
length | Length of the line in pixels. |
color | Color of the line, in display native format. |
See gfx_generic_draw_vertical_line
Referenced by gfx_generic_draw_filled_circle(), and gfx_generic_draw_rect().
#define gfx_duplicate_pixel | ( | color, | |
count | |||
) | ili93xx_duplicate_pixel(color, count) |
ILI93XX display driver specific function, see ili93xx_duplicate_pixel.
#define gfx_get_pixel | ( | x, | |
y | |||
) | gfx_ili93xx_get_pixel(x, y) |
ILI93XX display driver specific function, see gfx_ili93xx_get_pixel.
#define gfx_get_pixmap | ( | pixmap, | |
map_width, | |||
map_x, | |||
map_y, | |||
x, | |||
y, | |||
width, | |||
height | |||
) |
Read a rectangular block of pixels from the screen into data memory.
ILI93XX display driver uses generic gfx implementation for this function.
If the area to read is outside the clipping region, those pixels will not be read, and the corresponding data memory will be left untouched. Note that this function fails if width or height is negative or the pixel rectangle is outside the pixmap buffer extents. Clipping is only performed on the screen, not inside the pixmap buffer itself. Note that there is no checking if the pixel rectangle exceeds the bottom of the pixmap buffer.
pixmap | Pointer to pixel buffer in data memory. |
map_width | Width of the pixel buffer. |
map_x | X coordinate inside pixel buffer. |
map_y | Y coordinate inside pixel buffer. |
x | X coordinate on screen. |
y | Y coordinate on screen. |
width | Width of pixel rectangle to copy. |
height | Height of pixel rectangle to copy. |
Referenced by wtk_continue_drag(), and wtk_start_drag().
#define gfx_init | ( | ) | gfx_ili93xx_init() |
ILI93XX display driver specific function, see gfx_ili93xx_init.
Referenced by main().
#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) |
ILI93XX display driver uses generic gfx implementation for this function.
#define gfx_put_pixmap | ( | pixmap, | |
map_width, | |||
map_x, | |||
map_y, | |||
x, | |||
y, | |||
width, | |||
height | |||
) |
Write a rectangular block of pixels stored in data memory to the screen.
ILI93XX display driver uses generic gfx implementation for this function.
If the area to write is outside the clipping region, those pixels will not be written. Note that this function fails if the width or height is negative or the pixel rectangle is outside the pixmap buffer extents. Clipping is only performed on the screen, not inside the pixmap buffer itself. Note that there is no checking if the pixel rectangle exceeds the bottom of the pixmap buffer.
pixmap | Pointer to pixel buffer in data memory. |
map_width | Width of the pixel buffer. |
map_x | X coordinate inside pixel buffer. |
map_y | Y coordinate inside pixel buffer. |
x | X coordinate on screen. |
y | Y coordinate on screen. |
width | Width of pixel rectangle to copy. |
height | Height of pixel rectangle to copy. |
Referenced by wtk_continue_drag(), and wtk_stop_drag().
#define gfx_set_bottom_right_limit | ( | x, | |
y | |||
) | ili93xx_set_bottom_right_limit(x, y) |
ILI93XX display driver specific function, see ili93xx_set_bottom_right_limit.
#define gfx_set_ext_handler | ( | ext_draw_handler | ) | gfx_generic_set_ext_handler(ext_draw_handler) |
ILI93XX display driver uses generic gfx implementation for this function.
#define gfx_set_limits | ( | x1, | |
y1, | |||
x2, | |||
y2 | |||
) | ili93xx_set_limits(x1, y1, x2, y2) |
ILI93XX display driver specific function, see ili93xx_set_limits.
#define gfx_set_orientation | ( | flags | ) | gfx_ili93xx_set_orientation(flags) |
ILI93XX display driver specific function, see gfx_ili93xx_set_orientation.
#define gfx_set_top_left_limit | ( | x, | |
y | |||
) | ili93xx_set_top_left_limit(x, y) |
ILI93XX display driver specific function, see ili93xx_set_top_left_limit.
#define gfx_sync | ( | void | ) | gfx_generic_sync() |
ILI93XX display driver uses generic gfx implementation for this function.
See gfx_generic_sync
#define ILI93XX_LCD_CS 1 |
Referenced by gfx_ili93xx_init().
gfx_color_t gfx_ili93xx_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_ili93xx_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. |
References gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, gfx_set_top_left_limit(), and ili93xx_write_gram().
void gfx_ili93xx_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. |
References gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, gfx_set_limits(), and ili93xx_write_gram().
gfx_color_t gfx_ili93xx_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_bitmap::color, GFX_COLOR_INVALID, gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, gfx_set_limits(), and ili93xx_read_gram().
void gfx_ili93xx_init | ( | void | ) |
Initialize the ili93xx 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.
References AAT31XX_AVG_BACKLIGHT_LEVEL, aat31xx_disable_backlight(), aat31xx_set_backlight(), ili93xx_opt_t::background_color, COLOR_BLACK, COLOR_WHITE, ili93xx_opt_t::foreground_color, GFX_COLOR, gfx_draw_filled_rect, gfx_height, gfx_set_clipping(), gfx_width, ili93xx_display_on(), ili93xx_init(), ILI93XX_LCD_CS, ILI93XX_LCD_HEIGHT, ILI93XX_LCD_WIDTH, pmc_enable_periph_clk(), smc_set_cycle_timing(), smc_set_mode(), smc_set_pulse_timing(), smc_set_setup_timing(), ili93xx_opt_t::ul_height, and ili93xx_opt_t::ul_width.
void gfx_ili93xx_set_orientation | ( | uint8_t | flags | ) |
Set display orientation.
Set the display orientation
flags |
References gfx_height, gfx_set_clipping(), GFX_SWITCH_XY, gfx_width, ILI93XX_LCD_HEIGHT, ILI93XX_LCD_WIDTH, ili93xx_set_orientation(), ILI93XX_SWITCH_XY_HEIGHT, and ILI93XX_SWITCH_XY_WIDTH.
gfx_coord_t gfx_height |
Current height of screen.
Referenced by gfx_generic_draw_line(), gfx_get_height(), gfx_ili93xx_init(), gfx_ili93xx_set_orientation(), and gfx_set_clipping().
gfx_coord_t gfx_max_x |
Minimum X of current clipping region.
Referenced by gfx_generic_draw_filled_rect(), gfx_generic_get_pixmap(), gfx_generic_put_bitmap(), gfx_generic_put_pixmap(), gfx_ili93xx_draw_line_pixel(), gfx_ili93xx_draw_pixel(), gfx_ili93xx_get_pixel(), and gfx_set_clipping().
gfx_coord_t gfx_max_y |
Maximum Y of current clipping region.
Referenced by gfx_generic_draw_filled_rect(), gfx_generic_get_pixmap(), gfx_generic_put_bitmap(), gfx_generic_put_pixmap(), gfx_ili93xx_draw_line_pixel(), gfx_ili93xx_draw_pixel(), gfx_ili93xx_get_pixel(), and gfx_set_clipping().
gfx_coord_t gfx_min_x |
Minimum X of current clipping region.
Referenced by gfx_generic_draw_filled_rect(), gfx_generic_get_pixmap(), gfx_generic_put_bitmap(), gfx_generic_put_pixmap(), gfx_ili93xx_draw_line_pixel(), gfx_ili93xx_draw_pixel(), gfx_ili93xx_get_pixel(), and gfx_set_clipping().
gfx_coord_t gfx_min_y |
Maximum Y of current clipping region.
Referenced by gfx_generic_draw_filled_rect(), gfx_generic_get_pixmap(), gfx_generic_put_bitmap(), gfx_generic_put_pixmap(), gfx_ili93xx_draw_line_pixel(), gfx_ili93xx_draw_pixel(), gfx_ili93xx_get_pixel(), and gfx_set_clipping().
gfx_coord_t gfx_width |
Current width of screen.
Referenced by gfx_generic_draw_line(), gfx_get_width(), gfx_ili93xx_init(), gfx_ili93xx_set_orientation(), and gfx_set_clipping().