Hi,
I found a really shocking misbehavior while developing a project for the LPC1114 chip under LPCXpresso IDE using such a library. In short: a calling to the function Chip_GPIO_SetPinDirOutput() always calls Chip_GPIO_SetPinDirInput(), WTH!!. Then I tried the more general function Chip_GPIO_SetPinDIR(), which in turn did what was expected.
More about the project:
I captured some pics so you see the issue closer:
As far as I now, LPCopen 2.0 release library is the last (and old one) for this chip. Any ideas?
Hi Customer,
I have check our LPCOpen 2.0 library for lpc11c24, I didn't find this definition:
My code is download from this link:
LPCOpen Software for LPC11XX|NXP
I don't know where you find it, or you write it by yourself?
I think you can debug this function, check _dir, when you intput : Pin::output, check ouput value, and the _dir value if you want to use Chip_GPIO_SetPinDIROutput function, _dir should be 0. Check your output, is it 0?
I think the problem may caused by this Pin::Pin function, or the value of your output.
Please check it again on your side.
Any updated information, please let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
The code in C++ is mine. What is important here is that the library function Chip_GPIO_SetPinDirOutput() always calls Chip_GPIO_SetPinDirInput(). I'm using the library you've mentioned.
So, are you saying that in your Pin:Pin method always calls SetPinDirOutput, regardless of the stat of _dir? Or are you saying that the LPCOpen function calls the wrong thin?
if it is your code, can you provide an example of how you invoke the method!