GPIO port and number

hani
Hi
I have a question about gpio number and port.
what is the meaning of each number in gpio? Is it start from 0 to unlimited
number or not? 
is it just used specific numbers?
this formula i saw in some where:
--------------------------------------------------
GPIO_num = GPIO_port * 32 + GPIO_bit 
example if you wanted to toggle pin 9 (GPF0) of the expansion header you
would use the value 5*32+0 = 160.
-------------------------------------------------- 
in this sample what is gpio port?
is it always 5?

what is 32?

what is GPF? what is the meaning of the number 0? ( I know in datasheet of
board write GPF0 for pin number 9 but what is GPF and the numbers means? )

davef
GPF, in your example will be 5 or the 5th port.

GPF likely just means the 5th group of ports.  All ports and/or parts of
them might not be GPIO, but could be used for other purposes.

32 suggests to me that each port has 32 available pins.  I think this is
also called the "base number".  Is your formulae from some other
microprocessor?

The mini2440 has 16 pins available per port group, for some purpose GPIO or
hardware. I am not sure if the "base number" is 16, in this case.

0 is your first port.  In computer science the number base starts at 0 not
1.  For the mini2440 the ports pins go up to 15, which gives you a total of
16 pins.