QuartusProjects/FPGA_Inference/verilog_src/platform_designer_components/i2c/c_code/i2c.h
void i2c_write_word(int base_addr, int word, int bits) {
  int bit, mask;

  if (bits > 0) {
	  mask = 0x1 << (bits - 1);
	  for (bit = 0; bit<bits; bit++) {
		i2c_write_bit(base_addr, word & mask);
		word <<= 1;
	  }
  }
}
// Write a byte to I2C bus. Return 0 if ack by the slave.
Write a byte to I2C bus. Return 0 if ack by the slave.
Write a byte to I2C bus . Return 0 if ack by the slave .
void i2c_write_word(int base_addr, int word, int bits) {
  int bit, mask;
  if (bits > 0) {
	  mask = 0x1 << (bits - 1);
	  for (bit = 0; bit<bits; bit++) {
		i2c_write_bit(base_addr, word & mask);
		word <<= 1;
	  }
  }
}
void i2c_write_word ( int base_addr , int word , int bits ) { int bit , mask ; if ( bits > 0 ) { mask = 0x1 << ( bits - 1 ) ; for ( bit = 0 ; bit < bits ; bit ++ ) { i2c_write_bit ( base_addr , word & mask ) ; word <<= 1 ; } } }
Write a byte to I2C bus.
Write a byte to I2C bus .