Ubuntu Manpages

util_twi

<util/twi.h>: TWI bit mask definitions


#define TW_READ 1
#define TW_WRITE 0

#include <util/twi.h> 

This header file contains bit mask definitions for use with the AVR TWI interface.

illegal start or stop condition

arbitration lost in SLA+R or NACK

data received, ACK returned

data received, NACK returned

SLA+R transmitted, ACK received

SLA+R transmitted, NACK received

arbitration lost in SLA+W or data

data transmitted, ACK received

data transmitted, NACK received

SLA+W transmitted, ACK received

SLA+W transmitted, NACK received

no state information available

SLA+R address

repeated start condition transmitted

arbitration lost in SLA+RW, general call received, ACK returned

arbitration lost in SLA+RW, SLA+W received, ACK returned

data received, ACK returned

data received, NACK returned

general call received, ACK returned

general call data received, ACK returned

general call data received, NACK returned

SLA+W received, ACK returned

stop or repeated start condition received while selected

arbitration lost in SLA+RW, SLA+R received, ACK returned

data transmitted, ACK received

data transmitted, NACK received

last data byte transmitted, ACK received

SLA+R received, ACK returned

start condition transmitted

TWSR, masked by TW_STATUS_MASK

Value:

(_BV(TWS7)|_BV(TWS6)|_BV(TWS5)|_BV(TWS4)|\
				_BV(TWS3))
The lower 3 bits of TWSR are reserved on the ATmega163. The 2 LSB carry the prescaler bits on the newer ATmegas.

SLA+W address

Generated automatically by Doxygen for avr-libc from the source code.