oled 1.0
OLED Graphics Control Library
Loading...
Searching...
No Matches
TWI_defines.h File Reference

Macro definitions for TWI/I2C communication flags and operations. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TWI_ACKNOWLEDGE   0x01
 Flag representing a TWI acknowledgment (ACK).
#define TWI_NACKNOWLEDGE   0x00
 Flag representing a TWI not-acknowledgment (NACK).
#define TWI_WRITE   0x00
#define TWI_READ   0x01
 Flag representing a TWI read operation.

Detailed Description

Macro definitions for TWI/I2C communication flags and operations.

This header file contains essential macros for handling TWI (Two-Wire Interface) communication.

Note
These macros serve to improve code clarity and maintain protocol compliance by providing meaningful names for standard TWI/I2C signal and operation indicators.
Author
g.raf
Date
2025-09-02
Version
1.0 Release
Note
This file is part of a larger project and subject to the license specified in the repository. For updates and the complete revision history, see the GitHub repository.
See also
https://github.com/0x007e/avr-common "AVR ATmega GitHub Repository"

Macro Definition Documentation

◆ TWI_ACKNOWLEDGE

#define TWI_ACKNOWLEDGE   0x01

Flag representing a TWI acknowledgment (ACK).

This macro defines the value used to indicate that an acknowledgment has been received on the TWI (I2C) bus. It is typically used to signal successful data reception or transmission acknowledgement.

◆ TWI_NACKNOWLEDGE

#define TWI_NACKNOWLEDGE   0x00

Flag representing a TWI not-acknowledgment (NACK).

Flag representing a TWI write operation.

This macro defines the value used to indicate that a not-acknowledgment (NACK) has been received on the TWI (I2C) bus. It signals that the last transmitted byte was not acknowledged by the receiver.

This macro defines the value used to indicate a write command on the TWI (I2C) bus, where the master sends data to a slave device.

◆ TWI_READ

#define TWI_READ   0x01

Flag representing a TWI read operation.

This macro defines the value used to indicate a read command on the TWI (I2C) bus, where the master requests data from the slave device.

◆ TWI_WRITE

#define TWI_WRITE   0x00