mirror of https://github.com/ARMmbed/mbed-os.git
RTL8195A: Cope correctly with NC GPIO
parent
bd69ede5dc
commit
0fb64eee4e
|
|
@ -83,10 +83,11 @@ void gpio_init(gpio_t *obj, PinName pin)
|
||||||
{
|
{
|
||||||
uint32_t pin_name;
|
uint32_t pin_name;
|
||||||
|
|
||||||
|
obj->pin = pin;
|
||||||
|
|
||||||
if (pin == (PinName)NC)
|
if (pin == (PinName)NC)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
obj->pin = pin;
|
|
||||||
obj->mode = PullNone;
|
obj->mode = PullNone;
|
||||||
obj->direction = PIN_INPUT;
|
obj->direction = PIN_INPUT;
|
||||||
pin_name = gpio_set(pin); // get the IP pin name
|
pin_name = gpio_set(pin); // get the IP pin name
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue