]> cvs.zerfleddert.de Git - rsbs2/blame - bmc/bmc.c
I2C master mode implemented and more decoding
[rsbs2] / bmc / bmc.c
CommitLineData
d6f38d0d 1#include <avr/io.h>
7f52e040 2#include <avr/sleep.h>
99e4226b 3#include <avr/interrupt.h>
d6f38d0d
MG
4#include <stdio.h>
5#include "usart.h"
99e4226b 6#include "i2c.h"
77ad1a84
MG
7#include "bmc.h"
8
d6f38d0d
MG
9int main(void)
10{
d6f38d0d 11 DDRB = 0xff;
7f52e040 12 PORTB = 0xff;
d6f38d0d
MG
13
14 usart_init();
7f52e040
MG
15 printf("\n");
16
99e4226b
MG
17 i2c_init();
18
7f52e040
MG
19 printf("Waiting for I2C...\n");
20
99e4226b 21 sei();
d6f38d0d 22
d6f38d0d 23 while(1) {
7f52e040
MG
24#if 1
25 sleep_mode();
26#endif
d6f38d0d
MG
27 }
28
29 return 0;
30}
Impressum, Datenschutz