From 77ad1a84f7fa19a455a228d7b9679291e94550ea Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 22 Aug 2010 20:19:29 +0200 Subject: [PATCH 1/1] ipmb messages from RSBS2 card --- bmc/bmc.c | 14 ++++++++++++-- bmc/i2c.c | 42 +++++++++++++++++++++++++++++++++++++++--- bmc/ipmb-messages.txt | 16 ++++++++++++++++ 3 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 bmc/ipmb-messages.txt 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<