avr-game
view avrgame.c @ 0:9db99968b55e
initial commit, screen test working
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 09 Sep 2014 04:40:47 +0300 |
parents | |
children | 872e425f0e7f |
line source
1 #include <avr/io.h>
2 #include <util/delay.h>
3 #include "dotmatrix.h"
5 /* hardware setup
6 * - Port B[1,5]: lcd signals (see dotmatrix.h)
7 * - B1: clk
8 * - B2: Din
9 * - B3: DC
10 * - B4: CE
11 * - B5: RST
12 */
14 /*int lcd_stream_write(char c, FILE *fp);*/
16 /*FILE stream_lcd = FDEV_SETUP_STREAM(lcd_stream_write, NULL, _FDEV_SETUP_WRITE);*/
18 int main(void)
19 {
20 /* stdout = stderr = &stream_lcd; */
22 dm_init();
23 dm_test();
25 for(;;) {
26 _delay_ms(800);
27 }
29 return 0;
30 }
32 #if 0
33 int lcd_stream_write(char c, FILE *fp)
34 {
35 /* TODO terminal shit handling */
36 return 0;
37 }
38 #endif