avr-game
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/avrgame.c Tue Sep 09 04:40:47 2014 +0300 1.3 @@ -0,0 +1,38 @@ 1.4 +#include <avr/io.h> 1.5 +#include <util/delay.h> 1.6 +#include "dotmatrix.h" 1.7 + 1.8 +/* hardware setup 1.9 + * - Port B[1,5]: lcd signals (see dotmatrix.h) 1.10 + * - B1: clk 1.11 + * - B2: Din 1.12 + * - B3: DC 1.13 + * - B4: CE 1.14 + * - B5: RST 1.15 + */ 1.16 + 1.17 +/*int lcd_stream_write(char c, FILE *fp);*/ 1.18 + 1.19 +/*FILE stream_lcd = FDEV_SETUP_STREAM(lcd_stream_write, NULL, _FDEV_SETUP_WRITE);*/ 1.20 + 1.21 +int main(void) 1.22 +{ 1.23 + /* stdout = stderr = &stream_lcd; */ 1.24 + 1.25 + dm_init(); 1.26 + dm_test(); 1.27 + 1.28 + for(;;) { 1.29 + _delay_ms(800); 1.30 + } 1.31 + 1.32 + return 0; 1.33 +} 1.34 + 1.35 +#if 0 1.36 +int lcd_stream_write(char c, FILE *fp) 1.37 +{ 1.38 + /* TODO terminal shit handling */ 1.39 + return 0; 1.40 +} 1.41 +#endif