Atmel Software Framework

example1.c File Reference

Graphic library example application.

Copyright (c) 2012 Atmel Corporation. All rights reserved.

#include <board.h>
#include <sysclk.h>
#include "asf.h"
#include "smiley.h"
#include "atmel_logo.h"

Macros

#define GAP   (STEP + SPACING)
 
#define LANDSCAPE_MODE
 
#define SPACING   10
 
#define STEP   20
 

Functions

int main (void)
 main example code More...
 

Variables

const gfx_color_t color_table []
 
const char example_string [] = "Atmel Graphical Library GFX Service Test"
 

#define GAP   (STEP + SPACING)

Referenced by main().

#define LANDSCAPE_MODE
#define SPACING   10

Referenced by main().

#define STEP   20

Referenced by main().

int main ( void  )

main example code

The main function will draw all the graphic primitives from the graphic library on a line from left to right (incrementing x) and repeat this from bottom to top with varying colors (incrementing y). Below the figures it draws the Atmel logo centered on the screen.

References b, board_init(), color_table, example_string, GAP, gfx_color(), GFX_COLOR_RED, GFX_COLOR_TRANSPARENT, GFX_COLOR_WHITE, gfx_draw_bitmap(), gfx_draw_circle, gfx_draw_filled_circle, gfx_draw_filled_rect, gfx_draw_horizontal_line, gfx_draw_line, gfx_draw_pixel(), gfx_draw_rect, gfx_draw_string_aligned(), gfx_draw_vertical_line, GFX_FLIP_Y, gfx_get_height(), gfx_get_width(), gfx_init, gfx_set_orientation(), GFX_SWITCH_XY, GFX_WHOLE, SPACING, STEP, sysclk_init(), sysfont, TEXT_ALIGN_LEFT, TEXT_POS_CENTER_X, and y.

const gfx_color_t color_table[]
Initial value:
#define GFX_COLOR_GREEN
Definition: gfx.h:163
#define GFX_COLOR_YELLOW
Definition: gfx.h:169
#define GFX_COLOR_MAGENTA
Definition: gfx.h:167
#define GFX_COLOR_CYAN
Definition: gfx.h:171
#define GFX_COLOR_RED
Definition: gfx.h:161
#define GFX_COLOR_BLUE
Definition: gfx.h:165

Referenced by main().

const char example_string[] = "Atmel Graphical Library GFX Service Test"

Referenced by main().