Skip to content

Commit ff20fc3

Browse files
committed
"gpio_api.c" update
1, "gpio_api.c" update. fix issues for compiling the mbed-cloud-client-example
1 parent b06553f commit ff20fc3

File tree

1 file changed

+9
-1
lines changed
  • targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A

1 file changed

+9
-1
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/gpio_api.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,18 @@ void gpio_pull_ctrl(gpio_t *obj, PinMode pull_type)
195195
HAL_GPIO_PullCtrl((u32) obj->pin, (u32)pull_type);
196196
}
197197

198-
199198
void gpio_deinit(gpio_t *obj)
200199
{
201200
HAL_GPIO_DeInit(&obj->hal_pin);
202201
}
203202

203+
int gpio_is_connected(const gpio_t *obj)
204+
{
205+
if(obj->pin != (PinName)NC){
206+
return 1;
207+
} else {
208+
return 0;
209+
}
210+
}
211+
204212
#endif

0 commit comments

Comments
 (0)