/* Reads the input data of specified GPIO port pin.  */
bool GPIO_ReadInputDataBit(GPIO_TypeDef *gpio, u16 pin)
/* Reads the input data of specified GPIO port pin.  */
bool GPIO_ReadInputDataBit(GPIO_TypeDef *gpio, u16 pin)
{
    return ((gpio->IDR & pin)) ? Bit_SET : Bit_RESET;
}