![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "chip.h"
Go to the source code of this file.
Functions | |
void | Chip_I2C_Init (LPC_I2C_Type *I2Cx) |
Initializes the LPC_I2C peripheral with specified parameter. | |
void | Chip_I2C_DeInit (LPC_I2C_Type *I2Cx) |
De-initializes the I2C peripheral registers to their default reset values. | |
void | Chip_I2C_SetClockRate (LPC_I2C_Type *I2Cx, uint32_t clockrate) |
Set up clock rate for LPC_I2C peripheral. | |
uint32_t | Chip_I2C_GetClockRate (LPC_I2C_Type *I2Cx) |
Get current clock rate for LPC_I2C peripheral. | |
Status | Chip_I2C_MasterTransferData (LPC_I2C_Type *I2Cx, I2C_M_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Transmit and Receive data in master mode. | |
Status | Chip_I2C_MasterTransmitData (LPC_I2C_Type *I2Cx, I2C_M_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Transmit an array of bytes in Master mode. | |
Status | Chip_I2C_MasterReceiveData (LPC_I2C_Type *I2Cx, I2C_M_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Receive an array of bytes in Master mode. | |
uint32_t | Chip_I2C_MasterWriteReg (LPC_I2C_Type *I2Cx, uint32_t SlaveAddr, uint8_t regAddr, uint8_t *buffer, uint8_t buffer_len) |
Write byte(s) to slave register. | |
uint32_t | Chip_I2C_MasterReadReg (LPC_I2C_Type *I2Cx, uint32_t SlaveAddr, uint8_t regAddr, uint8_t *buffer, uint8_t buffer_len) |
Read slave register content. | |
void | Chip_I2C_Interrupt_MasterHandler (LPC_I2C_Type *I2Cx) |
General Master Interrupt handler for I2C peripheral. | |
bool | Chip_I2C_Interrupt_MasterTransferComplete (LPC_I2C_Type *I2Cx) |
Get status of Master Transfer. | |
Status | Chip_I2C_SlaveTransferData (LPC_I2C_Type *I2Cx, I2C_S_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Receive and Transmit data in slave mode. | |
Status | Chip_I2C_SlaveTransmitData (LPC_I2C_Type *I2Cx, I2C_S_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Transmit an array of bytes in Slave mode. | |
Status | Chip_I2C_SlaveReceiveData (LPC_I2C_Type *I2Cx, I2C_S_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Receive an array of bytes in Slave mode. | |
void | Chip_I2C_Interrupt_SlaveHandler (LPC_I2C_Type *I2Cx) |
General Slave Interrupt handler for I2C peripheral. | |
bool | Chip_I2C_Interrupt_SlaveTransferComplete (LPC_I2C_Type *I2Cx) |
Get status of Slave Transfer. | |
STATIC INLINE void | Chip_I2C_SetOwnSlaveAddr (LPC_I2C_Type *I2Cx, I2C_OWNSLAVEADDR_CFG_Type *OwnSlaveAddrConfigStruct) |
Set Own slave address in I2C peripheral corresponding to parameter specified in OwnSlaveAddrConfigStruct. | |
STATIC INLINE void | Chip_I2C_Cmd (LPC_I2C_Type *I2Cx, I2C_Mode Mode, FunctionalState NewState) |
Enable or disable I2C peripheral's operation. | |