/* Extract the port number form the given identifier. 
The port number is extracted by looking at bits 10, 11, 12, 13 of the base register addresses.  */
static int _port_num(gpio_t pin)
/* Extract the port number form the given identifier. 
The port number is extracted by looking at bits 10, 11, 12, 13 of the base register addresses.  */
static int _port_num(gpio_t pin)
{
    return ((pin >> 10) & 0x0f);
}