LPCOpen Platform for LPC18XX/43XX microcontrollers: C:/w/lpcopen_docs/software/lpc_core/lpc_chip/chip_18xx_43xx/i2c_common_18xx_43xx.h File Reference

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros
i2c_common_18xx_43xx.h File Reference

Go to the source code of this file.

## Data Structures
struct | LPC_I2C_T
| I2C register block structure. More...

## Macros
#define | I2C_I2CONSET_AA ((0x04))
#define | I2C_I2CONSET_SI ((0x08))
#define | I2C_I2CONSET_STO ((0x10))
#define | I2C_I2CONSET_STA ((0x20))
#define | I2C_I2CONSET_I2EN ((0x40))
#define | I2C_I2CONCLR_AAC ((1 << 2))
#define | I2C_I2CONCLR_SIC ((1 << 3))
#define | I2C_I2CONCLR_STOC ((1 << 4))
#define | I2C_I2CONCLR_STAC ((1 << 5))
#define | I2C_I2CONCLR_I2ENC ((1 << 6))
#define | I2C_CON_AA (1UL << 2)
#define | I2C_CON_SI (1UL << 3)
#define | I2C_CON_STO (1UL << 4)
#define | I2C_CON_STA (1UL << 5)
#define | I2C_CON_I2EN (1UL << 6)
#define | I2C_STAT_CODE_BITMASK ((0xF8))
#define | I2C_STAT_CODE_ERROR ((0xFF))
#define | I2C_I2STAT_M_TX_START ((0x08))
#define | I2C_I2STAT_M_TX_RESTART ((0x10))
#define | I2C_I2STAT_M_TX_SLAW_ACK ((0x18))
#define | I2C_I2STAT_M_TX_SLAW_NACK ((0x20))
#define | I2C_I2STAT_M_TX_DAT_ACK ((0x28))
#define | I2C_I2STAT_M_TX_DAT_NACK ((0x30))
#define | I2C_I2STAT_M_TX_ARB_LOST ((0x38))
#define | I2C_I2STAT_M_RX_START ((0x08))
#define | I2C_I2STAT_M_RX_RESTART ((0x10))
#define | I2C_I2STAT_M_RX_ARB_LOST ((0x38))
#define | I2C_I2STAT_M_RX_SLAR_ACK ((0x40))
#define | I2C_I2STAT_M_RX_SLAR_NACK ((0x48))
#define | I2C_I2STAT_M_RX_DAT_ACK ((0x50))
#define | I2C_I2STAT_M_RX_DAT_NACK ((0x58))
#define | I2C_I2STAT_S_RX_SLAW_ACK ((0x60))
#define | I2C_I2STAT_S_RX_ARB_LOST_M_SLA ((0x68))
#define | I2C_I2STAT_S_RX_GENCALL_ACK ((0x70))
#define | I2C_I2STAT_S_RX_ARB_LOST_M_GENCALL ((0x78))
#define | I2C_I2STAT_S_RX_PRE_SLA_DAT_ACK ((0x80))
#define | I2C_I2STAT_S_RX_PRE_SLA_DAT_NACK ((0x88))
#define | I2C_I2STAT_S_RX_PRE_GENCALL_DAT_ACK ((0x90))
#define | I2C_I2STAT_S_RX_PRE_GENCALL_DAT_NACK ((0x98))
#define | I2C_I2STAT_S_RX_STA_STO_SLVREC_SLVTRX ((0xA0))
#define | I2C_I2STAT_S_TX_SLAR_ACK ((0xA8))
#define | I2C_I2STAT_S_TX_ARB_LOST_M_SLA ((0xB0))
#define | I2C_I2STAT_S_TX_DAT_ACK ((0xB8))
#define | I2C_I2STAT_S_TX_DAT_NACK ((0xC0))
#define | I2C_I2STAT_S_TX_LAST_DAT_ACK ((0xC8))
#define | I2C_SLAVE_TIME_OUT 0x10000000UL
#define | I2C_I2DAT_BITMASK ((0xFF))
#define | I2C_I2DAT_IDLE_CHAR (0xFF)
#define | I2C_I2MMCTRL_MM_ENA ((1 << 0))
#define | I2C_I2MMCTRL_ENA_SCL ((1 << 1))
#define | I2C_I2MMCTRL_MATCH_ALL ((1 << 2))
#define | I2C_I2MMCTRL_BITMASK ((0x07))
#define | I2DATA_BUFFER_BITMASK ((0xFF))
#define | I2C_I2ADR_GC ((1 << 0))
#define | I2C_I2ADR_BITMASK ((0xFF))
#define | I2C_I2MASK_MASK(n) ((n & 0xFE))
#define | I2C_I2SCLH_BITMASK ((0xFFFF))
#define | I2C_I2SCLL_BITMASK ((0xFFFF))
#define | I2C_MONITOR_CFG_SCL_OUTPUT I2C_I2MMCTRL_ENA_SCL
#define | I2C_MONITOR_CFG_MATCHALL I2C_I2MMCTRL_MATCH_ALL