main.c 1.46 KB
Newer Older
1
/*******************************************************************************
2
 * License: TBD
3
4
5
 ******************************************************************************/

/***** Includes *****/
6
#include "DEV_Config.h"
7
#include "Fonts/fonts.h"
8
9
10
#include "display.h"
#include "gfx.h"
#include "gpio.h"
11
#include "image/image.h"
12
#include "tmr.h"
13
#include "tmr_utils.h"
14

15
16
17
#include "card10.h"

#include <stdint.h>
18
#include <stdio.h>
19
20
#include <string.h>

21
22
23
// *****************************************************************************
int main(void)
{
Rahix's avatar
Rahix committed
24
25
26
27
28
	int count = 0;

	card10_init();
	card10_diag();

29
30
31
32
33
34
35
	Color red    = gfx_color(&display_screen, RED);
	Color green  = gfx_color(&display_screen, GREEN);
	Color yellow = gfx_color(&display_screen, YELLOW);

	gfx_puts(&Font24, &display_screen, 0, 0, "123", 0x000f, 0xfff8);
	gfx_puts(&Font24, &display_screen, 23, 0, "ABC", 0x000f, 0xfff8);
	gfx_rectangle(&display_screen, 70, 10, 100, 40, 2, red);
36
37
	gfx_line(&display_screen, 70, 10, 100, 40, 2, green);
	gfx_line(&display_screen, 100, 10, 70, 40, 2, yellow);
38
39
	gfx_circle(&display_screen, 85, 25, 22, 2, green);

40
	gfx_copy_region(
41
42
43
44
45
		&display_screen,
		120,
		0,
		40,
		40,
46
47
		GFX_RAW,
		40 * 40 * 2,
48
		(const void *)(gImage_40X40)
Rahix's avatar
Rahix committed
49
	);
50
	gfx_copy_region(
51
52
53
54
55
		&display_screen,
		0,
		0,
		160,
		80,
56
57
		GFX_RAW,
		160 * 80 * 2,
58
		(const void *)(gImage_160X80)
Rahix's avatar
Rahix committed
59
	);
60
	gfx_update(&display_screen);
Rahix's avatar
Rahix committed
61
62
63
64
65
66
67

	DEV_Delay_ms(3000);

	while (1) {
		TMR_Delay(MXC_TMR0, MSEC(1000), 0);
		printf("count = %d\n", count++);
	}
68
}