avr-game

diff dotmatrix.h @ 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dotmatrix.h	Tue Sep 09 04:40:47 2014 +0300
     1.3 @@ -0,0 +1,27 @@
     1.4 +#ifndef DOTMATRIX_H_
     1.5 +#define DOTMATRIX_H_
     1.6 +
     1.7 +#include <avr/io.h>
     1.8 +
     1.9 +/* change these port/pin assignments to match the circuit */
    1.10 +#define DM_PORT		PORTB
    1.11 +#define DM_DDR		DDRB
    1.12 +#define DM_PIN_CLK	5	/* sck */
    1.13 +#define DM_PIN_DIN	3	/* mosi */
    1.14 +#define DM_PIN_DC	1
    1.15 +#define DM_PIN_CE	2
    1.16 +#define DM_PIN_RST	0
    1.17 +/* end of config block, don't touch anything below */
    1.18 +
    1.19 +#define DM_WIDTH	48
    1.20 +#define DM_HEIGHT	84
    1.21 +
    1.22 +int dm_init(void);
    1.23 +void dm_test(void);
    1.24 +
    1.25 +void dm_invert(void);
    1.26 +
    1.27 +void dm_clear(unsigned char val);
    1.28 +void dm_copy(int x, int y, const unsigned char *fb, int bytes);
    1.29 +
    1.30 +#endif	/* DOTMATRIX_H_ */