22 #ifndef LIBBSP_ARM_LPC32XX_I2C_H 23 #define LIBBSP_ARM_LPC32XX_I2C_H 52 #define I2CCLK_1_EN BSP_BIT32(0) 53 #define I2CCLK_2_EN BSP_BIT32(1) 54 #define I2CCLK_1_HIGH_DRIVE BSP_BIT32(2) 55 #define I2CCLK_2_HIGH_DRIVE BSP_BIT32(3) 56 #define I2CCLK_USB_HIGH_DRIVE BSP_BIT32(4) 66 #define I2C_TX_READ BSP_BIT32(0) 67 #define I2C_TX_ADDR(val) BSP_FLD32(val, 1, 7) 68 #define I2C_TX_START BSP_BIT32(8) 69 #define I2C_TX_STOP BSP_BIT32(9) 79 #define I2C_STAT_TDI BSP_BIT32(0) 80 #define I2C_STAT_AFI BSP_BIT32(1) 81 #define I2C_STAT_NAI BSP_BIT32(2) 82 #define I2C_STAT_DRMI BSP_BIT32(3) 83 #define I2C_STAT_DRSI BSP_BIT32(4) 84 #define I2C_STAT_ACTIVE BSP_BIT32(5) 85 #define I2C_STAT_SCL BSP_BIT32(6) 86 #define I2C_STAT_SDA BSP_BIT32(7) 87 #define I2C_STAT_RFF BSP_BIT32(8) 88 #define I2C_STAT_RFE BSP_BIT32(9) 89 #define I2C_STAT_TFF BSP_BIT32(10) 90 #define I2C_STAT_TFE BSP_BIT32(11) 91 #define I2C_STAT_TFFS BSP_BIT32(12) 92 #define I2C_STAT_TFES BSP_BIT32(13) 102 #define I2C_CTRL_TDIE BSP_BIT32(0) 103 #define I2C_CTRL_AFIE BSP_BIT32(1) 104 #define I2C_CTRL_NAIE BSP_BIT32(2) 105 #define I2C_CTRL_DRMIE BSP_BIT32(3) 106 #define I2C_CTRL_DRSIE BSP_BIT32(4) 107 #define I2C_CTRL_RFFIE BSP_BIT32(5) 108 #define I2C_CTRL_RFDAIE BSP_BIT32(6) 109 #define I2C_CTRL_TFFIO BSP_BIT32(7) 110 #define I2C_CTRL_RESET BSP_BIT32(8) 111 #define I2C_CTRL_SEVEN BSP_BIT32(9) 112 #define I2C_CTRL_TFFSIE BSP_BIT32(10) 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:129
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:216
Definition: 8xx_immap.h:216
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:174
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:137
rtems_status_code
Classic API Status.
Definition: status.h:43
void lpc32xx_i2c_reset(volatile lpc32xx_i2c *i2c)
Resets the I2C module i2c.
Definition: i2c.c:28
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:121
rtems_status_code lpc32xx_i2c_clock(volatile lpc32xx_i2c *i2c, unsigned clock_in_hz)
Sets the I2C module i2c clock.
Definition: i2c.c:55
rtems_status_code lpc32xx_i2c_init(volatile lpc32xx_i2c *i2c, unsigned clock_in_hz)
Initializes the I2C module i2c.
Definition: i2c.c:33
Definition: lpc32xx.h:475
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77