I have spent the last four days searching for info on how to use the GPIOs in a LPC1347. What little I have found assumes an understanding far beyond mine. I want to write a simple program that reads inputs, writes outputs and delays a little at times. After four days of searching I have yet to find even the simple commands that let me read from and write to the GPIO registers. The LPCOpen programs were of little help. Where might I find this information, please?
Solved! Go to Solution.
I discovered the problem. I need to put "void" in front of the asterisk.
I discovered the problem. I need to put "void" in front of the asterisk.
Thank you for your response. Using your recommendation I was able to turn on and off the LED. However I am still unable to read from or write to the GPIO registers. I get errors for what "I think" are legitimate commands. The following is part of my code:
Chip_GPIO_Init(0x50000000);
[Gives error: passing argument 1 of 'Chip_GPIO_Init' makes pointer from integer without a cast [-Wint-conversion]]
Chip_GPIO_SetPinDIROutput((*)0x50000000, 0, 7);
[Gives error: Syntax error]
Chip_GPIO_SetPinState((*)0x50000000, 0, 7, 1);
[Gives error: Syntax error]
Chip_GPIO_SetPinToggle((*)0x50000000, 0, 7, 1);
[Gives error: Syntax error]
x = Chip_GPIO_GetPinState((*)0x50000000, 0, 1);
[Gives error: Syntax error]
Is this the correct way to access the GPIO registers? If not, what is the correct way. If so, where are these errors coming from, please.
Hi,
Please check the following document, this is for LPC11u24 however the process is the same for the LPC1347 device.
How to create a new LPC project using LPCOpen and LPCXpresso
Let me know if this helps!!
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------