Real Time Clock Module with I2C Interface  0.3
⇒ back to Project Page
 All Data Structures Files Functions Variables Typedefs Macros Pages
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]dataarray with data bytes:
[slave_address + Read/Write-Bit,
register address,
data byte,
data byte,
data byte ... ]
[in]number_bytesnumber of data bytes in array to read or write
[in]end_noackslave 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().

Here is the call graph for this function:

Here is the caller graph for this function: