lpcware

LPC_I2C define missing in LPCOpen2.01 for LPC8xx in project lpc_chip_8xx_lib in file chip.h

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by larryvc on Mon Jan 05 19:07:57 MST 2015
It is completely missing, see below.  Did you forget that UM10601 says "The I2C-bus interface is available on all parts." ;-)
[color=#f00]//  The LPC_I2C define does not exist.
//  The struct LPC_I2C_T should be in file i2c_8xx.h but it too is missing.[/color]
#define LPC_I2C             ((LPC_I2C_T         *) LPC_I2C_BASE)


Most of the other peripherals have defines.  The corresponding structs defining the block structure of the peripheral are found in the corresponding "peripheral"_8xx.h file:

Portion of chip.h:

/* APB0 peripherals */
.
.
.
#define LPC_SYSCTL_BASE       (0x40048000UL)
#define LPC_I2C_BASE          (0x40050000UL)
.
.
.
#define LPC_WWDT            ((LPC_WWDT_T     *) LPC_WWDT_BASE)
#define LPC_SPI0            ((LPC_SPI_T      *) LPC_SPI0_BASE)
#define LPC_SPI1            ((LPC_SPI_T      *) LPC_SPI1_BASE)
#define LPC_USART0          ((LPC_USART_T    *) LPC_USART0_BASE)
#define LPC_USART1          ((LPC_USART_T    *) LPC_USART1_BASE)
#define LPC_USART2          ((LPC_USART_T    *) LPC_USART2_BASE)
#define LPC_WKT             ((LPC_WKT_T         *) LPC_WKT_BASE)
#define LPC_PMU             ((LPC_PMU_T         *) LPC_PMU_BASE)
#define LPC_CRC             ((LPC_CRC_T         *) LPC_CRC_BASE)
#define LPC_SCT             ((LPC_SCT_T         *) LPC_SCT_BASE)
#define LPC_GPIO_PORT       ((LPC_GPIO_T        *) LPC_GPIO_PORT_BASE)
#define LPC_PININT          ((LPC_PIN_INT_T     *) LPC_PIN_INT_BASE)
#define LPC_IOCON           ((LPC_IOCON_T       *) LPC_IOCON_BASE)
#define LPC_SWM             ((LPC_SWM_T         *) LPC_SWM_BASE)
#define LPC_SYSCTL          ((LPC_SYSCTL_T      *) LPC_SYSCTL_BASE)
#define LPC_CMP             ((LPC_CMP_T         *) LPC_CMP_BASE)
#define LPC_FMC             ((LPC_FMC_T         *) LPC_FMC_BASE)
#define LPC_MRT             ((LPC_MRT_T         *) LPC_MRT_BASE)

Outcomes