mirror of https://github.com/ARMmbed/mbed-os.git
"gpio_api.c" update
1, "gpio_api.c" update. fix issues for compiling the mbed-cloud-client-examplepull/8014/head
parent
b06553fa25
commit
ff20fc3341
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue