|
|
| uint8_t i2c_master_data_io |
( |
uint8_t * |
data, |
|
|
uint8_t |
number_bytes, |
|
|
uint8_t |
end_noack |
|
) |
| |
Sends or receives data from master to slave or vice versa via I2C. This function handles the complete communication with a slave.
- Parameters
-
| [in] | data | array with data bytes:
[slave_address + Read/Write-Bit,
register address,
data byte,
data byte,
data byte ... ]
|
| [in] | number_bytes | number of data bytes in array to read or write |
| [in] | end_noack | slave sends NOACK after receiving last byte (TRUE), or a NOACK will be always interpreted as an error value from the slave (FALSE) |
- Date
- Created 16.05.2010
- Modified 16.05.2010
- See Also
- i2c.h,I2C_MAX_TIMEOUT_WAIT_CYCLES, I2C_TIMEOUT_RETRY_WAIT_US, I2C_STA_RETRY_WAIT_US, the interrupt service routine for the slave mode I2C communication in the file isr.c
- Returns
- I2C return codes for master mode (see the respective part in i2c.h)
- Author
- Michael Skutek, micha.nosp@m.el@s.nosp@m.kutek.nosp@m..de
Definition at line 191 of file i2c.c.
Referenced by main(), rtc_setup_ds1307(), saa1064_init(), saa1064_read_status(), and saa1064_send_digits().
|