Browse Source

removed some junk

Ondřej Hruška 4 years ago
parent
commit
b69a3fed31
1 changed files with 4 additions and 11 deletions
  1. 4 11
      main.c

+ 4 - 11
main.c View File

@@ -3,14 +3,15 @@
3 3
 #include <avr/interrupt.h>   // interrupt vectors
4 4
 #include <util/delay.h>      // delay functions
5 5
 
6
-#include <stdint.h>          // C header for int types like uint8_t
7
-#include <stdbool.h>         // C header for the bool type
6
+#include <stdint.h>
7
+#include <stdbool.h>
8 8
 
9 9
 // Include stuff from the library
10 10
 #include "lib/iopins.h"
11 11
 #include "lib/usart.h"
12 12
 #include "lib/debounce.h"
13 13
 
14
+/* uppercase key names */
14 15
 static const char names[] = {
15 16
 	'L', // 2
16 17
 	'U', // 3
@@ -25,6 +26,7 @@ static const char names[] = {
25 26
 	'Y', // 12
26 27
 };
27 28
 
29
+/* nr of keys down */
28 30
 uint8_t down = 0;
29 31
 
30 32
 static void pin_change_handler(uint8_t n, bool state)
@@ -86,18 +88,9 @@ void main(void)
86 88
 {
87 89
 	hw_init();
88 90
 
89
-
90
-	// globally enable interrupts (for the USART_RX handler)
91
-	//sei();
92
-	//pin_up(9);
93
-
94 91
 	int cnt = 0;
95 92
 	while (1) {
96 93
 		_delay_ms(1);
97 94
 		debo_tick();
98
-
99
-		if (cnt++ > 500) {
100
-			cnt = 0;
101
-		}
102 95
 	}
103 96
 }