-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
85 lines (44 loc) · 711 Bytes
/
main.c
File metadata and controls
85 lines (44 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#include "gpio.h"
#include "buttons.h"
#include "LED.h"
#include "uart.h"
#include "test.h"
#include "twi.h"
#include "utility.h"
#include <stdlib.h>
/*
ssize_t _read(int fd, void *buf, size_t count){
char *str = (char*)(buf);
char letter;
do{
letter = uart_read();
} while(letter == '\0');
*str = letter;
return 1;
}
*/
int main(){
uart_init();
//test_gpiote_ppi();
/*
SDA koblet til pin nr. 16, p0.30
SCL koblet til port nr. 17, p0.00
*/
LED_init();
uart_init();
test_keyboard_to_LED();
while(1){
}
return 0;
/*
buttons_init();
test_LED_init();
int sleep = 0;
while(1){
test_LED();
sleep = 10000;
while(--sleep);
}
return 0;
*/
}