Merge pull request #7856 from fredlee12001/master

Realtek: fix gpio is connected
pull/7962/head
Martin Kojtal 2018-09-18 12:28:14 +02:00 committed by GitHub
commit 7bcb066917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -199,4 +199,13 @@ 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