Home | History | Annotate | Download | only in bitbash

Lines Matching refs:i2c

28 #include <gpxe/i2c.h>
32 * I2C bit-bashing interface
34 * This implements a simple I2C master via a bit-bashing interface
41 * Max rated i2c speed (for the basic i2c protocol) is 100kbps,
49 * Set state of I2C SCL line
61 * Set state of I2C SDA line
73 * Get state of I2C SDA line
86 * Send an I2C start condition
98 * Send an I2C data bit
111 * Receive an I2C data bit
126 * Send an I2C stop condition
137 * Send byte via I2C bus and check for acknowledgement
143 * Sends a byte via the I2C bus and checks for an acknowledgement from
165 * Receive byte via I2C bus
170 * Receives a byte via the I2C bus and sends NACK to the slave device.
190 * Select I2C device for reading or writing
193 * @v i2cdev I2C device
224 * Reset I2C bus
229 * i2c devices often don't have a reset line, so even a reboot or
264 * Read data from I2C device via bit-bashing interface
266 * @v i2c I2C interface
267 * @v i2cdev I2C device
274 * check for I2C device presence.
276 static int i2c_bit_read ( struct i2c_interface *i2c,
280 = container_of ( i2c, struct i2c_bit_basher, i2c );
318 * Write data to I2C device via bit-bashing interface
320 * @v i2c I2C interface
321 * @v i2cdev I2C device
328 * check for I2C device presence.
330 static int i2c_bit_write ( struct i2c_interface *i2c,
334 = container_of ( i2c, struct i2c_bit_basher, i2c );
368 * Initialise I2C bit-bashing interface
370 * @v i2cbit I2C bit-bashing interface
382 i2cbit->i2c.read = i2c_bit_read;
383 i2cbit->i2c.write = i2c_bit_write;
385 /* Reset I2C bus */
387 DBGC ( basher, "I2CBIT %p could not reset I2C bus: %s\n",