]> git.zerfleddert.de Git - rsbs2/blame - bmc/bmc.c
working i2c connection to RSBS2-card
[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"
d6f38d0d
MG
7
8int main(void)
9{
d6f38d0d 10 DDRB = 0xff;
7f52e040 11 PORTB = 0xff;
d6f38d0d
MG
12
13 usart_init();
7f52e040
MG
14 printf("\n");
15
99e4226b
MG
16 i2c_init();
17
7f52e040
MG
18 printf("Waiting for I2C...\n");
19
99e4226b 20 sei();
d6f38d0d 21
7f52e040 22 PORTB = 0xff;
d6f38d0d
MG
23
24 while(1) {
7f52e040
MG
25#if 1
26 sleep_mode();
27#endif
d6f38d0d
MG
28 }
29
30 return 0;
31}
Impressum, Datenschutz