]> git.zerfleddert.de Git - rsbs2/blob - bmc/bmc.c
4a7f02f489b2f45df33fee5e7ecf5876fc28efce
[rsbs2] / bmc / bmc.c
1 #include <avr/io.h>
2 #include <avr/sleep.h>
3 #include <avr/interrupt.h>
4 #include <stdio.h>
5 #include "usart.h"
6 #include "i2c.h"
7 #include "bmc.h"
8
9 void decode_bmc_cmd(unsigned char *buf, int len)
10 {
11 int i;
12
13 for(i = 0; i < len; i++) {
14 printf("0x%02x ", buf[i]);
15 }
16
17 printf("\n");
18 }
19
20 int main(void)
21 {
22 DDRB = 0xff;
23 PORTB = 0xff;
24
25 usart_init();
26 printf("\n");
27
28 i2c_init();
29
30 printf("Waiting for I2C...\n");
31
32 sei();
33
34 while(1) {
35 #if 1
36 sleep_mode();
37 #endif
38 }
39
40 return 0;
41 }
Impressum, Datenschutz