/* Read the pad value for a single pin in a GPIO port.  */
unsigned int GPIO_PinInGet(GPIO_Port_TypeDef port, unsigned int pin)
/* Read the pad value for a single pin in a GPIO port.  */
unsigned int GPIO_PinInGet(GPIO_Port_TypeDef port, unsigned int pin)
{
  EFM_ASSERT(GPIO_PORT_VALID(port) && GPIO_PIN_VALID(pin));
  return((unsigned int)((GPIO->P[port].DIN >> pin) & 0x1));
}