Skip to content

Commit 0fb64ee

Browse files
committed
RTL8195A: Cope correctly with NC GPIO
1 parent bd69ede commit 0fb64ee

File tree

1 file changed

+2
-1
lines changed
  • targets/TARGET_Realtek/TARGET_AMEBA/TARGET_MCU_RTL8195A

1 file changed

+2
-1
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_MCU_RTL8195A/gpio_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ void gpio_init(gpio_t *obj, PinName pin)
8383
{
8484
uint32_t pin_name;
8585

86+
obj->pin = pin;
87+
8688
if (pin == (PinName)NC)
8789
return;
8890

89-
obj->pin = pin;
9091
obj->mode = PullNone;
9192
obj->direction = PIN_INPUT;
9293
pin_name = gpio_set(pin); // get the IP pin name

0 commit comments

Comments
 (0)