openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
lpc17_i2c.h File Reference

I2C driver for LPC17xx. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define i2cMAX_MSG_LENGTH   32
 Max message length (in bits) used in I2C.
 
#define xI2CMasterWrite(id, addr, tx_buff, tx_len)   Chip_I2C_MasterSend(id, addr, tx_buff, tx_len)
 
#define xI2CMasterRead(id, addr, rx_buff, rx_len)   Chip_I2C_MasterRead(id, addr, rx_buff, rx_len)
 

Functions

uint8_t xI2CSlaveReceive (I2C_ID_T id, uint8_t *rx_buff, uint8_t buff_len, uint32_t timeout)
 
void vI2CSlaveSetup (I2C_ID_T id, uint8_t slave_addr)
 
void vI2CConfig (I2C_ID_T id, uint32_t speed)
 
int xI2CMasterWriteRead (I2C_ID_T id, uint8_t addr, const uint8_t *tx_buff, int tx_len, uint8_t *rx_buff, int rx_len)
 

Detailed Description

I2C driver for LPC17xx.

Author
Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br, LNLS
Date
March 2016

Macro Definition Documentation

◆ i2cMAX_MSG_LENGTH

#define i2cMAX_MSG_LENGTH   32

Max message length (in bits) used in I2C.

◆ xI2CMasterRead

#define xI2CMasterRead ( id,
addr,
rx_buff,
rx_len )   Chip_I2C_MasterRead(id, addr, rx_buff, rx_len)

◆ xI2CMasterWrite

#define xI2CMasterWrite ( id,
addr,
tx_buff,
tx_len )   Chip_I2C_MasterSend(id, addr, tx_buff, tx_len)

Function Documentation

◆ vI2CConfig()

void vI2CConfig ( I2C_ID_T id,
uint32_t speed )

◆ vI2CSlaveSetup()

void vI2CSlaveSetup ( I2C_ID_T id,
uint8_t slave_addr )

◆ xI2CMasterWriteRead()

int xI2CMasterWriteRead ( I2C_ID_T id,
uint8_t addr,
const uint8_t * tx_buff,
int tx_len,
uint8_t * rx_buff,
int rx_len )

◆ xI2CSlaveReceive()

uint8_t xI2CSlaveReceive ( I2C_ID_T id,
uint8_t * rx_buff,
uint8_t buff_len,
uint32_t timeout )