Permalink
Browse files

final handout, fixes to 2-2-blinky_no_delay

  • Loading branch information...
1 parent d36f681 commit 5a96efc995a70837e0c4476ee9a2b2f3b10eeca1 @mikepea committed Mar 5, 2011
View
Binary file not shown.
@@ -6,35 +6,14 @@
*/
#include <avr/io.h>
+#include "common.h"
#include "badge.h"
unsigned int loop_counter = 0;
unsigned int second_counter = 0;
-void delay_ten_us(unsigned int us) {
- unsigned int count;
-
- while (us != 0) {
- for (count=0; count <= 8; count++) {
- PINB |= bogusMask;
- }
- us--;
- }
-}
-
void pre_loop_setup() {
- // zero our timer controls, for now
- TCCR0A = 0;
- TCCR0B = 0;
- TCCR1 = 0;
- GTCCR = 0;
-
- DDRB = (rgbMask) | ( irOutMask );
-
- // all PORTB output pins High (all LEDs off), except for the
- // IR LED, which is SOURCE not SINK
- PORTB = ( 0xFF & ~irOutMask );
-
+ initialise_registers();
}
int main(void) {

0 comments on commit 5a96efc

Please sign in to comment.