Content originally posted in LPCWare by j.loh on Thu Feb 13 06:51:43 MST 2014
Hello Kevin,
you're right, I already changed most of my code not to use LPC_GPIO3 directly, but to use the API. I was puzzled because the bug was reported in the bug tracker some time ago but did not considered in the current release.
In general, LPCopen is a good approach, because it hides most of the chip internals, better than CMSIS does. E.g. I'm just developing for a LPC1768 but later the project has to be ported to a LPC43xx. Hopefully LPCopen will speed up this task.
Another suggestion for the GPIO API: It should be possible to set mode and function of a GPIO pin independently with the API. Currently they're bound together:
void Chip_IOCON_PinMux(LPC_IOCON_T *pIOCON, uint8_t port, uint8_t pin, uint32_t mode, uint8_t func);
In most cases I want to change the pin's function and not it's mode. Since it's even not possible to read mode and/or function, this can't be done with the API.
Regards,
Jürgen