- I'm writing code using MCUXpresso IDE for a LPC1788 -
Has anybody used LPCOpen's Chip_GPIO_Init() function before? I started looking at the documentation at [1] and followed the links to the input parameter to that function [2] and [3]. So the definition of the structure given in the documentation [3] includes the data fields:
DATA
RESERVED
DIR
IS
IBE
IEV
IE
RIS
MIS
IC
However when I define the structure in C code "LPC_GPIO_T gpio;" and type "gpio." the IDE's autocompletion gives me the options:
CLR
DIR
MASK
RESERVED0
SET
There is a discrepancy between the documentation for LPCOpen and the IDE's interpretation, and I wonder which is correct. The documentation isn't clear on the function Chip_GPIO_Init() and what should be passed in. It appears to be a structure but perhaps I just call it with the address 0x20098000 which appears to be the base address of GPIO registers in the LPC1788, as in "Chip_GPIO_Init((LPC_GPIO_T *)0x20098000);"
Can anybody confirm the correct calling convention and if there's better documentation out there somewhere please let me know.
[1] LPCOpen Platform: CHIP: LPC17xx/40xx GPIO driver
[2] LPCOpen Platform: CHIP: LPC11xx Peripheral addresses and register set declarations
[3] LPCOpen Platform: IP_GPIO_003_T Struct Reference