C:/nxpdrv/LPC1700CMSIS/Drivers/include/lpc17xx_i2c.h File Reference
: Contains all macro definitions and function prototypes support for I2C firmware library on LPC17xx More...
#include "LPC17xx.h"
#include "lpc_types.h"
Go to the source code of this file.
Data Structures | |
struct | I2C_OWNSLAVEADDR_CFG_Type |
I2C Own slave address setting structure. More... | |
struct | I2C_M_SETUP_Type |
Master transfer setup data structure definitions. More... | |
struct | I2C_S_SETUP_Type |
Slave transfer setup data structure definitions. More... | |
Defines | |
#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_STAC ((1<<5)) |
#define | I2C_I2CONCLR_I2ENC ((1<<6)) |
#define | I2C_STAT_CODE_BITMASK ((0xF8)) |
#define | I2C_I2STAT_NO_INF ((0xF8)) |
#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 0x10000UL |
#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 | PARAM_I2C_SLAVEADDR_CH(n) ((n>=0) && (n<=3)) |
#define | PARAM_I2Cx(n) |
#define | I2C_SETUP_STATUS_ARBF (1<<8) |
#define | I2C_SETUP_STATUS_NOACKF (1<<9) |
#define | I2C_SETUP_STATUS_DONE (1<<10) |
#define | I2C_MONITOR_CFG_SCL_OUTPUT I2C_I2MMCTRL_ENA_SCL |
#define | I2C_MONITOR_CFG_MATCHALL I2C_I2MMCTRL_MATCH_ALL |
#define | PARAM_I2C_MONITOR_CFG(n) ((n==I2C_MONITOR_CFG_SCL_OUTPUT) || (I2C_MONITOR_CFG_MATCHALL)) |
Enumerations | |
enum | I2C_TRANSFER_OPT_Type { I2C_TRANSFER_POLLING = 0, I2C_TRANSFER_INTERRUPT } |
Transfer option type definitions. More... | |
Functions | |
void | I2C_SetClock (LPC_I2C_TypeDef *I2Cx, uint32_t target_clock) |
Setup clock rate for I2C peripheral. | |
void | I2C_DeInit (LPC_I2C_TypeDef *I2Cx) |
De-initializes the I2C peripheral registers to their default reset values. | |
void | I2C_Init (LPC_I2C_TypeDef *I2Cx, uint32_t clockrate) |
Initializes the I2Cx peripheral with specified parameter. | |
void | I2C_Cmd (LPC_I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enable or disable I2C peripheral's operation. | |
Status | I2C_MasterTransferData (LPC_I2C_TypeDef *I2Cx, I2C_M_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Transmit and Receive data in master mode. | |
Status | I2C_SlaveTransferData (LPC_I2C_TypeDef *I2Cx, I2C_S_SETUP_Type *TransferCfg, I2C_TRANSFER_OPT_Type Opt) |
Receive and Transmit data in slave mode. | |
void | I2C_SetOwnSlaveAddr (LPC_I2C_TypeDef *I2Cx, I2C_OWNSLAVEADDR_CFG_Type *OwnSlaveAddrConfigStruct) |
Set Own slave address in I2C peripheral corresponding to parameter specified in OwnSlaveAddrConfigStruct. | |
uint8_t | I2C_GetLastStatusCode (LPC_I2C_TypeDef *I2Cx) |
void | I2C_MonitorModeConfig (LPC_I2C_TypeDef *I2Cx, uint32_t MonitorCfgType, FunctionalState NewState) |
Configures functionality in I2C monitor mode. | |
void | I2C_MonitorModeCmd (LPC_I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enable/Disable I2C monitor mode. | |
uint8_t | I2C_MonitorGetDatabuffer (LPC_I2C_TypeDef *I2Cx) |
Get data from I2C data buffer in monitor mode. | |
void | I2C0_StdIntHandler (void) |
Standard Interrupt handler for I2C0 peripheral. | |
void | I2C1_StdIntHandler (void) |
Standard Interrupt handler for I2C1 peripheral. | |
void | I2C2_StdIntHandler (void) |
Standard Interrupt handler for I2C2 peripheral. |
Detailed Description
: Contains all macro definitions and function prototypes support for I2C firmware library on LPC17xx
- Version:
- : 1.0
- Date:
- : 13. Apr. 2009
- Author:
- : HieuNguyen
Definition in file lpc17xx_i2c.h.
Generated on Mon Feb 8 10:01:39 2010 for LPC1700CMSIS Standard Peripheral Firmware Library by
