"gpio_api.c" update

1, "gpio_api.c" update. fix issues for compiling the mbed-cloud-client-example
pull/8014/head
zzw 2018-09-06 14:40:06 +08:00
parent b06553fa25
commit ff20fc3341
1 changed files with 9 additions and 1 deletions

View File

@ -195,10 +195,18 @@ void gpio_pull_ctrl(gpio_t *obj, PinMode pull_type)
HAL_GPIO_PullCtrl((u32) obj->pin, (u32)pull_type);
}
void gpio_deinit(gpio_t *obj)
{
HAL_GPIO_DeInit(&obj->hal_pin);
}
int gpio_is_connected(const gpio_t *obj)
{
if(obj->pin != (PinName)NC){
return 1;
} else {
return 0;
}
}
#endif