基于TI公司的LM3S6432 arm cortex-M3 单片机,编写的I2C驱动,通过状态机来实现I2C协议,完成write和read功能。 void i2c_write_bytes(BYTE addr,unsigned long subaddr,unsigned char *data,unsigned long count); void i2c_read_bytes(BYTE addr,unsigned long subaddr,BYTE *data,unsigned long count);