Below are some sample calls to the attached driver. The delays in the code are to make scope debugging easier.
/* Enable the I2C signals */
MCF_GPIO_PASPAR |= ( MCF_GPIO_PASPAR_SDA_SDA
| MCF_GPIO_PASPAR_SCL_SCL);
I2Cinit();
printf(" initialization start!\n\n");
I2CsendByte(0x10,0x10,slave_addr);
/* Wait for a bit */
i=50000;
while(i--);
I2CsendByte(0x08,0x11,slave_addr);
printf(" initialization complete!\n\n");
for (i=0;i<8;i++)
{
printf("data = 0x%02x\n",I2CreceiveByte(i,slave_addr));
}