|
|
#define | I2C_MASTER_MODE_DISABLE ((uint32_t)0x00000000U) |
| |
|
#define | I2C_MASTER_MODE_ENABLE ((uint32_t)0x00000001U) |
| |
| #define | IS_I2C_MASTER_MODE(MASTER_MODE) |
| |
|
#define | I2C_SLAVE_MODE_ENABLE ((uint32_t)0x00000000U) |
| |
|
#define | I2C_SLAVE_MODE_DISABLE ((uint32_t)0x00000001U) |
| |
| #define | IS_I2C_SLAVE_MODE(SLAVE_MODE) |
| |
|
#define | I2C_BROAD_ACK_ENABLE ((uint32_t)0x00000000U) |
| |
|
#define | I2C_BROAD_ACK_DISABLE ((uint32_t)0x00000001U) |
| |
| #define | IS_I2C_BROAD_ACK(BROAD_ACK) |
| |
|
#define | I2C_HIGH_RATE_ENABLE ((uint32_t)0x00000000U) |
| |
|
#define | I2C_HIGH_RATE_DISABLE I2C_CR_H1M |
| |
|
#define | I2C_Direction_Transmitter ((uint8_t)0x00) |
| |
|
#define | I2C_Direction_Receiver ((uint8_t)0x01) |
| |
| #define | IS_I2C_DIRECTION(I2C_Direction) |
| |
|
#define | I2C_STA_0 ((uint8_t)(0x00)) |
| |
|
#define | I2C_STA_1 ((uint8_t)(0x01 << 5)) |
| |
|
#define | I2C_STO_0 ((uint8_t)(0x00)) |
| |
|
#define | I2C_STO_1 ((uint8_t)(0x01 << 4)) |
| |
|
#define | I2C_AA_0 ((uint8_t)(0x00)) |
| |
|
#define | I2C_AA_1 ((uint8_t)(0x01 << 2)) |
| |
|
#define | I2C_CR_Status_Mask ((uint8_t)(0xC3)) |
| |
|
#define | IS_I2C_STA(I2C_STA) (((I2C_STA) == I2C_STA_0) || ((I2C_STA) == I2C_STA_1)) |
| |
|
#define | IS_I2C_STO(I2C_STO) (((I2C_STO) == I2C_STO_0) || ((I2C_STO) == I2C_STO_1)) |
| |
|
#define | IS_I2C_AA(I2C_AA) (((I2C_AA) == I2C_AA_0) || ((I2C_AA) == I2C_AA_1)) |
| |
|
#define | I2C_FLAG_ERROR_UNDER ((uint32_t)0x00000000U) |
| |
|
#define | I2C_FLAG_USELESS ((uint32_t)0x000000F8U) |
| |
|
#define | I2C_FLAG_MASTER_TX_START ((uint32_t)0x00000008U) |
| |
|
#define | I2C_FLAG_MASTER_TX_RESTART ((uint32_t)0x00000010U) |
| |
|
#define | I2C_FLAG_MASTER_TX_SLAW_ACK ((uint32_t)0x00000018U) |
| |
|
#define | I2C_FLAG_MASTER_TX_SLAW_NOACK ((uint32_t)0x00000020U) |
| |
|
#define | I2C_FLAG_MASTER_TX_DATA_ACK ((uint32_t)0x00000028U) |
| |
|
#define | I2C_FLAG_MASTER_TX_DATA_NOACK ((uint32_t)0x00000030U) |
| |
|
#define | I2C_FLAG_MASTER_TX_LOST_SCL ((uint32_t)0x00000038U) |
| |
|
#define | I2C_FLAG_MASTER_RX_START ((uint32_t)0x00000008U) |
| |
|
#define | I2C_FLAG_MASTER_RX_RESTART ((uint32_t)0x00000010U) |
| |
|
#define | I2C_FLAG_MASTER_RX_SLAW_ACK ((uint32_t)0x00000040U) |
| |
|
#define | I2C_FLAG_MASTER_RX_SLAW_NOACK ((uint32_t)0x00000048U) |
| |
|
#define | I2C_FLAG_MASTER_RX_DATA_ACK ((uint32_t)0x00000050U) |
| |
|
#define | I2C_FLAG_MASTER_RX_DATA_NOACK ((uint32_t)0x00000058U) |
| |
|
#define | I2C_FLAG_MASTER_RX_LOST_SCL ((uint32_t)0x00000038U) |
| |
|
#define | I2C_FLAG_SLAVE_TX_SLAW_ACK ((uint32_t)0x000000A8U) |
| |
|
#define | I2C_FLAG_SLAVE_TX_DATA_ACK ((uint32_t)0x000000B8U) |
| |
|
#define | I2C_FLAG_SLAVE_TX_DATA_NOACK ((uint32_t)0x000000C0U) |
| |
|
#define | I2C_FLAG_SLAVE_TX_DATA_LAST ((uint32_t)0x000000C8U) |
| |
|
#define | I2C_FLAG_SLAVE_TX_LOST_SCL ((uint32_t)0x000000B0U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_SLAW_ACK ((uint32_t)0x00000060U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_BROAD_ACK ((uint32_t)0x00000070U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_SDATA_ACK ((uint32_t)0x00000080U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_SDATA_NOACK ((uint32_t)0x00000088U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_BDATA_ACK ((uint32_t)0x00000090U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_BDATA_NOACK ((uint32_t)0x00000098U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_SA_LOST_SCL ((uint32_t)0x00000068U) |
| |
|
#define | I2C_FLAG_SLAVE_RX_BA_LOST_SCL ((uint32_t)0x00000078U) |
| |
|
#define | I2C_FLAG_SLAVE_STOP_RESTART ((uint32_t)0x000000A0U) |
| |
This file contains all the functions prototypes for the I2C firmware library.
- 作者
- Westberry Application Team
- 版本
- V0.0.4
- 日期
- 23-April-2023