Revision 5b98becf main.c

View differences:

main.c
1
#define F_CPU 16000000L                                                                                                                                                  
1
#define F_CPU 16000000L
2

  
2 3
#include <inttypes.h>
3 4
#include <avr/io.h>
4 5
#include <util/delay.h>
5 6
#include <avr/interrupt.h>
6 7
#include <avr/pgmspace.h>
8
#include "bricks.h"
7 9

  
8 10
//let's make our lives easier :)
9 11
#define PORT_(port) PORT ## port
......
86 88
volatile uint16_t lines[90] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
87 89
volatile player_t player[NUMBER_OF_PLAYERS];
88 90

  
89
const uint16_t bricks[] PROGMEM = { 
90
	/* +----+
91
	 * |    |
92
	 * | ## |
93
	 * | ## |
94
	 * |    |
95
	 * +----+ */
96
	0b0000011001100000, 
97

  
98
	/* +----+
99
	 * |    |
100
	 * | #  |
101
	 * | ## |
102
	 * |  # |
103
	 * +----+ */
104
	0b0000010001100010,
105

  
106
	/* +----+
107
	 * |    |
108
	 * |  # |
109
	 * | ## |
110
	 * | #  |
111
	 * +----+ */
112
	0b0000001001100100, 
113

  
114
	/* +----+
115
	 * |    |
116
	 * | #  |
117
	 * | ## |
118
	 * | #  |
119
	 * +----+ */
120
	0b0000010001100100, 
121

  
122
	/* +----+
123
	 * | #  |
124
	 * | #  |
125
	 * | #  |
126
	 * | #  |
127
	 * +----+ */
128
	0b0100010001000100, 
129

  
130
	/* +----+
131
	 * |    |
132
	 * | #  |
133
	 * | #  |
134
	 * | ## |
135
	 * +----+ */
136
	0b0000010001000110, 
137

  
138
	/* +----+
139
	 * |    |
140
	 * |  # |
141
	 * |  # |
142
	 * | ## |
143
	 * +----+ */
144
	0b0000001000100110
145
};
146 91
volatile uint8_t keypressCounter = 0;
147 92

  
148 93
int main(){

Also available in: Unified diff