-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.c
57 lines (48 loc) · 1.42 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* --------------------------------------------------------------------------------------------+
* @desc Main example ILI9341 LCD driver
* --------------------------------------------------------------------------------------------+
* Copyright (C) 2020 Marian Hrinko.
* Written by Marian Hrinko ([email protected])
*
* @author Marian Hrinko
* @datum 12.12.2020
* @update 13.12.2020
* @file main.c
* @version 1.0
* @tested AVR Atmega328p
*
* @depend ili9341.h
* --------------------------------------------------------------------------------------------+
* @interface 8080-I Series Parallel Interface
* @pins 5V, 3.3V -> NC, GND, RST, CS, RS, WR, RD, D[7:0]
*
*/
#include <util/delay.h>
#include "lib/ili9341.h"
/**
* @desc Main function
*
* @param Void
*
* @return Void
*/
int main(void)
{
// init lcd
ILI9341_Init();
// clear Screen
ILI9341_ClearScreen(ILI9341_BLACK);
// draw horizontal fast line
ILI9341_DrawLineHorizontal(10, ILI9341_MAX_X - 10, 12, ILI9341_WHITE);
// draw horizontal fast line
ILI9341_DrawLineHorizontal(10, ILI9341_MAX_X - 10, 50, ILI9341_WHITE);
// set position
ILI9341_SetPosition(11, 25);
// draw string
ILI9341_DrawString("ILI9341 LCD DRIVER", ILI9341_RED, X3);
// EXIT
// -------------------------------------------------
// return & exit
return 0;
}