Content originally posted in LPCWare by wellsk on Fri Apr 04 13:03:43 MST 2014
If you passed in the base of a specific GPIO port peripheral to the GPIO block, you wouldn't need the port number.
All GPIO driver functions use the same API with the same based address (LPC_GPIO) on all platforms. Implementation of those functions varies per platform (ie, some platforms only have 1 GPIO peripheral block that handles multiple ports).
This appears to be an oversight on the lpc17xx platform. The only definition that should be there and should plug into that function should be LPC_GPIO.
LPC_GPIO1, 2, 3, etc. shouldn't exist and will be removed in future packages to prevent any confusion with the GPIO calls....