From: Michael Gernoth Date: Sun, 22 Aug 2010 18:19:29 +0000 (+0200) Subject: ipmb messages from RSBS2 card X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/77ad1a84f7fa19a455a228d7b9679291e94550ea ipmb messages from RSBS2 card --- diff --git a/bmc/bmc.c b/bmc/bmc.c index d7c5cdc..4a7f02f 100644 --- a/bmc/bmc.c +++ b/bmc/bmc.c @@ -4,6 +4,18 @@ #include #include "usart.h" #include "i2c.h" +#include "bmc.h" + +void decode_bmc_cmd(unsigned char *buf, int len) +{ + int i; + + for(i = 0; i < len; i++) { + printf("0x%02x ", buf[i]); + } + + printf("\n"); +} int main(void) { @@ -19,8 +31,6 @@ int main(void) sei(); - PORTB = 0xff; - while(1) { #if 1 sleep_mode(); diff --git a/bmc/i2c.c b/bmc/i2c.c index 214d410..7104758 100644 --- a/bmc/i2c.c +++ b/bmc/i2c.c @@ -2,11 +2,15 @@ #include #include #include "i2c.h" +#include "bmc.h" #define TWCR_ACK TWCR = (1<