i2cm: fix configuration for this hardware
[protos/imu.git] / i2cm_sw.c
index 78f562d..8c8e238 100644 (file)
--- a/i2cm_sw.c
+++ b/i2cm_sw.c
@@ -49,11 +49,11 @@ void (*g_i2cm_event)(i2cm_state state);
   A5 = PC5/SCL
 */
 
-#define I2CM_SCL_PORT  PORTC
-#define I2CM_SCL_BIT   5
+#define I2CM_SCL_PORT  PORTD
+#define I2CM_SCL_BIT   6
 
-#define  I2CM_SDA_PORT PORTC
-#define  I2CM_SDA_BIT  4
+#define  I2CM_SDA_PORT PORTD
+#define  I2CM_SDA_BIT  5
 
 #define I2CM_SCL   I2CM_SCL_PORT, I2CM_SCL_BIT
 #define I2CM_SDA   I2CM_SDA_PORT, I2CM_SDA_BIT
@@ -283,11 +283,13 @@ uint8_t i2cm_receive_byte(uint8_t last)
 
 
 
-uint8_t i2c_send(uint8_t addr, uint8_t* data, uint8_t len, uint8_t dummy)
+uint8_t i2c_send(uint8_t addr, uint8_t* data, uint8_t len, uint8_t ctrl)
 {
        uint8_t i;
        uint8_t err = 0;
 
+       (void)ctrl; /* ignored */
+
        err = i2cm_send_start((addr<<1) | 0);
        if (err)
                return err;
@@ -305,11 +307,13 @@ uint8_t i2c_send(uint8_t addr, uint8_t* data, uint8_t len, uint8_t dummy)
 
 uint8_t i2c_buf[0x20];
 
-uint8_t i2c_recv(uint8_t addr, uint8_t len, uint8_t dummy)
+uint8_t i2c_recv(uint8_t addr, uint8_t len, uint8_t ctrl)
 {
        uint8_t i;
        uint8_t err = 0;
 
+       (void)ctrl; /* ignored */
+
        err = i2cm_send_start((addr<<1) | 1);
        if (err)
                return err;