avr-game
view 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 source
1 #ifndef DOTMATRIX_H_
2 #define DOTMATRIX_H_
4 #include <avr/io.h>
6 /* change these port/pin assignments to match the circuit */
7 #define DM_PORT PORTB
8 #define DM_DDR DDRB
9 #define DM_PIN_CLK 5 /* sck */
10 #define DM_PIN_DIN 3 /* mosi */
11 #define DM_PIN_DC 1
12 #define DM_PIN_CE 2
13 #define DM_PIN_RST 0
14 /* end of config block, don't touch anything below */
16 #define DM_WIDTH 48
17 #define DM_HEIGHT 84
19 int dm_init(void);
20 void dm_test(void);
22 void dm_invert(void);
24 void dm_clear(unsigned char val);
25 void dm_copy(int x, int y, const unsigned char *fb, int bytes);
27 #endif /* DOTMATRIX_H_ */