-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.c
57 lines (43 loc) · 1.11 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
54
/*
* SSD1289 driver example
* Nils Stec <[email protected]>
* 2019-03-19
*
* This driver was written to be used with or without an OS.
* It works fine with FreeRTOS.
*
* The whole thing was written using a board called
* "HY-MiniSTM32V" with an LCD called "HY32D".
* It's specs:
* - STM32F103VCT6, 256k flash, 64k RAM
* - display connection 8080 bus to FSMC
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "stm32f10x.h"
#include "systick.h" // delay and time measurement functions
#include "random.h" // very small, but pseudorandom
#include "leds.h"
#include "buttons.h"
#include "ssd1289.h"
int main(void){
SystemInit();
init_leds();
/* inititalize systick timer */
init_systick();
/* initialize display and text functions */
ssd1289_init();
ssd1289_fill(RGB_COL_BLACK);
ssd1289_textcon_init();
ssd1289_set_font_color(RGB_COL_YELLOW, RGB_COL_BLACK);
ssd1289_set_font(FONT_XGA_8x14);
/* initialize touchscreen */
init_ads7843();
/* calibrate touchscreen */
ads7843_calibration();
for(;;) {
}
return 0;
}