FreeBSD/sys/dev/iicbus/iicbb.c
/*
 * Waiting for ACKNOWLEDGE.
 *
 * When a chip is being addressed or has received data it will issue an
 * ACKNOWLEDGE pulse. Therefore the MASTER must release the DATA line
 * (set it to high level) and then release the CLOCK line.
 * Now it must wait for the SLAVE to pull the DATA line low.
 * Actually on the bus this looks like a START condition so nothing happens
 * because of the fact that the IC's that have not been addressed are doing
 * nothing.
 *
 * When the SLAVE has pulled this line low the MASTER will take the CLOCK
 * line low and then the SLAVE will release the SDA (data) line.
 */
Waiting for ACKNOWLEDGE.
When a chip is being addressed or has received data it will issue an
ACKNOWLEDGE pulse. Therefore the MASTER must release the DATA line
(set it to high level) and then release the CLOCK line.
Now it must wait for the SLAVE to pull the DATA line low.
Actually on the bus this looks like a START condition so nothing happens
because of the fact that the IC's that have not been addressed are doing
nothing.

When the SLAVE has pulled this line low the MASTER will take the CLOCK
line low and then the SLAVE will release the SDA (data) line.
Waiting for ACKNOWLEDGE . When a chip is being addressed or has received data it will issue an ACKNOWLEDGE pulse . Therefore the MASTER must release the DATA line ( set it to high level ) and then release the CLOCK line . Now it must wait for the SLAVE to pull the DATA line low . Actually on the bus this looks like a START condition so nothing happens because of the fact that the IC ' s that have not been addressed are doing nothing . When the SLAVE has pulled this line low the MASTER will take the CLOCK line low and then the SLAVE will release the SDA ( data ) line .
static int
iicbb_ack(device_t dev, int timeout)
{
	struct iicbb_softc *sc = device_get_softc(dev);
	int noack;
	int k = 0;
	I2C_SET(sc,dev,0,1);
	I2C_SET(sc,dev,1,1);
	do {
		noack = I2C_GETSDA(dev);
		if (!noack)
			break;
		DELAY(1);
		k++;
	} while (k < timeout);
	I2C_SET(sc,dev,0,1);
	I2C_DEBUG(printf("%c ",noack?'-':'+'));
	return (noack);
}
static int iicbb_ack ( device_t dev , int timeout ) { struct iicbb_softc * sc = device_get_softc ( dev ) ; int noack ; int k = 0 ; I2C_SET ( sc , dev , 0 , 1 ) ; I2C_SET ( sc , dev , 1 , 1 ) ; do { noack = I2C_GETSDA ( dev ) ; if ( ! noack ) break ; DELAY ( 1 ) ; k ++ ; } while ( k < timeout ) ; I2C_SET ( sc , dev , 0 , 1 ) ; I2C_DEBUG ( printf ( " " , noack ? ' ' : ' ' ) ) ; return ( noack ) ; }
Waiting for ACKNOWLEDGE.
Waiting for ACKNOWLEDGE .