![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "sys_config.h"#include "cmsis.h"Go to the source code of this file.
Data Structures | |
| struct | IP_I2C_001_T |
| I2C register block structure. More... | |
| struct | I2C_XFER_T |
| Master transfer data structure definitions. More... | |
Enumerations | |
| enum | I2C_SLAVE_ID { I2C_SLAVE_GENERAL, I2C_SLAVE_0, I2C_SLAVE_1, I2C_SLAVE_2, I2C_SLAVE_3, I2C_SLAVE_NUM_INTERFACE } |
| I2C Slave Identifiers. More... | |
| enum | I2C_STATUS_T { I2C_STATUS_DONE, I2C_STATUS_NAK, I2C_STATUS_ARBLOST, I2C_STATUS_BUSERR, I2C_STATUS_BUSY } |
| I2C transfer status. More... | |
Functions | |
| STATIC INLINE void | IP_I2C_Init (IP_I2C_001_T *pI2C) |
| Initializes the pI2C peripheral. | |
| STATIC INLINE void | IP_I2C_DeInit (IP_I2C_001_T *pI2C) |
| De-initializes the I2C peripheral registers to their default reset values. | |
| STATIC INLINE void | IP_I2C_SetClockRate (IP_I2C_001_T *pI2C, uint32_t SCLValue) |
| Set up clock rate for I2Cx. | |
| STATIC INLINE uint32_t | IP_I2C_GetClockDiv (IP_I2C_001_T *pI2C) |
| Get current divisor clock value. | |
| STATIC INLINE void | IP_I2C_Master_StartXfer (IP_I2C_001_T *pI2C) |
| Enable I2C and start master transfer. | |
| int | IP_I2C_MasterXfer_StateHandler (IP_I2C_001_T *pI2C, I2C_XFER_T *xfer) |
| Master transfer state change handler. | |
| STATIC INLINE int | IP_I2C_IsStateChanged (IP_I2C_001_T *pI2C) |
| I2C State change checking. | |
| STATIC INLINE void | IP_I2C_Disable (IP_I2C_001_T *pI2C) |
| Disable I2C peripheral's operation. | |
| STATIC INLINE void | IP_I2C_SetSlaveAddress (IP_I2C_001_T *pI2C, I2C_SLAVE_ID sid, uint8_t addr, uint8_t mask) |
| Set OWN slave address for specific slave ID. | |
| STATIC INLINE int | IP_I2C_GetCurrentState (IP_I2C_001_T *pI2C) |
| Get current state of the I2C peripheral. | |
| I2C_SLAVE_ID | IP_I2C_GetSlaveIndex (IP_I2C_001_T *pI2C) |
| Get the slave ID of the active slave. | |
| int | IP_I2C_SlaveXfer_StateHandler (IP_I2C_001_T *pI2C, I2C_XFER_T *xfer) |
| Slave transfer state change handler. | |
| STATIC INLINE void | IP_I2C_Slave_StartXfer (IP_I2C_001_T *pI2C) |
| Enable I2C and enable slave transfers. | |
| STATIC INLINE int | IP_I2C_BusFree (IP_I2C_001_T *pI2C) |
| Check if I2C bus is free. | |
| STATIC INLINE int | IP_I2C_IsMasterState (IP_I2C_001_T *pI2C) |
| Check if the active state belongs to master mode. | |