In the GPIOSetDirMode function in SitaraWare, the second argument is "the serial number of the GPIO pin." Where is this documented?
It's mentioned in the SitaraWare User's Guide, but finding it for a given pin isn't documented. The AM17x/AM18x GPIO User's Guide (SPRUFV2A) contains no mention of a serial number. The AM1808 datasheet (SPRS653B), which contains the Pin Map of the device, contains the GPx[y] names and the BGA grid references (e.g. V3 = GP7[13]), but still no mention of a serial number.
According to the SitaraWare Migration Notes, the pin serial number was used to keep the number of arguments the same. The first argument to the StellarisWare function was the base address of the relevant GPIO bank, but since Sitara only has one base register, I think that the first argument to this function could be made more useful; perhaps something that implies the bank you're trying to set. Perhaps, to be more like StellarisWare, some defines could be added like:
#define GPIO_O_DIR 0x0
#define GPIO_O_OUT_DATA 0x4
#define GPIO_O_SET_DATA 0x8
...
#define GPIO_O_INTSTAT 0x24
#define GPIO_BANK01_BASE (SOC_GPIO_0_REGS + 0x10)
#define GPIO_BANK23_BASE (SOC_GPIO_0_REGS + 0x38)
I accept that some things are going to change between these two platforms, but in the interests of migrating from Stellaris to Sitara, the very first function in the Migration Notes could have been made more consistent.