36#ifndef LIBBSP_ARM_LPC32XX_I2C_H
37#define LIBBSP_ARM_LPC32XX_I2C_H
66#define I2CCLK_1_EN BSP_BIT32(0)
67#define I2CCLK_2_EN BSP_BIT32(1)
68#define I2CCLK_1_HIGH_DRIVE BSP_BIT32(2)
69#define I2CCLK_2_HIGH_DRIVE BSP_BIT32(3)
70#define I2CCLK_USB_HIGH_DRIVE BSP_BIT32(4)
80#define I2C_TX_READ BSP_BIT32(0)
81#define I2C_TX_ADDR(val) BSP_FLD32(val, 1, 7)
82#define I2C_TX_START BSP_BIT32(8)
83#define I2C_TX_STOP BSP_BIT32(9)
93#define I2C_STAT_TDI BSP_BIT32(0)
94#define I2C_STAT_AFI BSP_BIT32(1)
95#define I2C_STAT_NAI BSP_BIT32(2)
96#define I2C_STAT_DRMI BSP_BIT32(3)
97#define I2C_STAT_DRSI BSP_BIT32(4)
98#define I2C_STAT_ACTIVE BSP_BIT32(5)
99#define I2C_STAT_SCL BSP_BIT32(6)
100#define I2C_STAT_SDA BSP_BIT32(7)
101#define I2C_STAT_RFF BSP_BIT32(8)
102#define I2C_STAT_RFE BSP_BIT32(9)
103#define I2C_STAT_TFF BSP_BIT32(10)
104#define I2C_STAT_TFE BSP_BIT32(11)
105#define I2C_STAT_TFFS BSP_BIT32(12)
106#define I2C_STAT_TFES BSP_BIT32(13)
116#define I2C_CTRL_TDIE BSP_BIT32(0)
117#define I2C_CTRL_AFIE BSP_BIT32(1)
118#define I2C_CTRL_NAIE BSP_BIT32(2)
119#define I2C_CTRL_DRMIE BSP_BIT32(3)
120#define I2C_CTRL_DRSIE BSP_BIT32(4)
121#define I2C_CTRL_RFFIE BSP_BIT32(5)
122#define I2C_CTRL_RFDAIE BSP_BIT32(6)
123#define I2C_CTRL_TFFIO BSP_BIT32(7)
124#define I2C_CTRL_RESET BSP_BIT32(8)
125#define I2C_CTRL_SEVEN BSP_BIT32(9)
126#define I2C_CTRL_TFFSIE BSP_BIT32(10)
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_status_code lpc32xx_i2c_init(volatile lpc32xx_i2c *i2c, unsigned clock_in_hz)
Initializes the I2C module i2c.
Definition: i2c.c:46
rtems_status_code lpc32xx_i2c_read_start(volatile lpc32xx_i2c *i2c, unsigned addr)
Starts a read transaction on the I2C module i2c.
Definition: i2c.c:142
rtems_status_code lpc32xx_i2c_read_with_optional_stop(volatile lpc32xx_i2c *i2c, uint8_t *in, size_t n, bool stop)
Reads data via the I2C module i2c with optional stop.
Definition: i2c.c:187
rtems_status_code lpc32xx_i2c_write_start(volatile lpc32xx_i2c *i2c, unsigned addr)
Starts a write transaction on the I2C module i2c.
Definition: i2c.c:134
void lpc32xx_i2c_reset(volatile lpc32xx_i2c *i2c)
Resets the I2C module i2c.
Definition: i2c.c:41
rtems_status_code lpc32xx_i2c_write_with_optional_stop(volatile lpc32xx_i2c *i2c, const uint8_t *out, size_t n, bool stop)
Writes data via the I2C module i2c with optional stop.
Definition: i2c.c:150
rtems_status_code lpc32xx_i2c_clock(volatile lpc32xx_i2c *i2c, unsigned clock_in_hz)
Sets the I2C module i2c clock.
Definition: i2c.c:68
rtems_status_code lpc32xx_i2c_write_and_read(volatile lpc32xx_i2c *i2c, unsigned addr, const uint8_t *out, size_t out_size, uint8_t *in, size_t in_size)
Writes and reads data via the I2C module i2c.
Definition: i2c.c:229
This header file defines the RTEMS Classic API.
Definition: 8xx_immap.h:210
Definition: lpc32xx.h:470