/* Deinitializes the gpio peripheral registers to their default reset values.  */
void GPIO_DeInit(GPIO_TypeDef *gpio)
/* Deinitializes the gpio peripheral registers to their default reset values.  */
void GPIO_DeInit(GPIO_TypeDef *gpio)
{
    switch (*(vu32*)&gpio) {
        case (u32)GPIOA:
            RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOA, DISABLE);
            break;
        case (u32)GPIOB:
            RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOB, DISABLE);
            break;
        case (u32)GPIOC:
            RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOC, DISABLE);
            break;
        case (u32)GPIOD:
            RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOD, DISABLE);
            break;
        case (u32)GPIOE:
            RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOE, DISABLE);
            break;
        default:
            break;
    }
}