-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathevo.c
More file actions
40 lines (33 loc) · 685 Bytes
/
evo.c
File metadata and controls
40 lines (33 loc) · 685 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
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include "config.h"
#include "driver.h"
#include "tty.h"
#include "cc1101.h"
#include "led.h"
#include "transcoder.h"
void main_init(void) {
// OSCCAL=((uint32_t)OSCCAL * 10368) / 10000;
wdt_disable();
led_init();
// Wire up components
transcoder_init(&tty_write_str, &driver_send_byte);
driver_init(&transcoder_accept_inbound_byte);
tty_init(&transcoder_accept_outbound_byte);
cc_init(&driver_accept_bit, &driver_request_bit);
led_off();
sei();
}
void main_work(void) {
driver_work();
tty_work();
cc_work();
}
#ifdef NEEDS_MAIN
int main(void) {
main_init();
while(1) {
main_work();
}
}
#endif