AT07334: SAM4 TWI Master Mode Driver [APPLICATION NOTE]
42274A-MCU-05/2014
11
#define TWIM_LOW_POWER_ENABLE
Enable TWIM Low Power Transfer by default.
4.3.9 Macro TWIM_SCR_NAK_MASK
#define TWIM_SCR_NAK_MASK
Mask to clear the DNAK and ANAK bits in the Status Clear register.
4.3.10 Macro TWIM_SR_NAK_MASK
#define TWIM_SR_NAK_MASK
Status Register mask to test for NAKs in data or address phase.
4.3.11 Macro TWIM_SR_STD_MASK
#define TWIM_SR_STD_MASK
Status Register mask to test for conditions ANAK or ARBLST.
4.4 Function Definitions
4.4.1 Function twi_master_read()
Read multiple bytes from a TWI compatible slave device.
status_code_t twi_master_read(
Twim * twim,
struct twim_package * package)
Table 4-3. Parameters
Data direction Parameter name Description
[in] twim Base address of the TWIM
[in] package Package information and data
Table 4-4. Return Values
Return value Description
STATUS_OK If all bytes were read successfully
ERR_IO_ERROR NACK received or Bus Arbitration lost
4.4.2 Function twi_master_write()
Write multiple bytes to a TWI compatible slave device.