mirror of https://github.com/ARMmbed/mbed-os.git
Update gpio_api.c
Modified gpio_set() to allow PIO0_0, PIO0_10, and PIO0_15 to be properly configured for GPIO.pull/321/head
parent
1073702cd2
commit
0438beba09
|
@ -26,10 +26,15 @@ static void gpio_enable(void) {
|
|||
}
|
||||
|
||||
uint32_t gpio_set(PinName pin) {
|
||||
|
||||
if (!gpio_enabled)
|
||||
gpio_enable();
|
||||
|
||||
int f = ((pin == P0_0) ||
|
||||
(pin == P0_10) ||
|
||||
(pin == P0_15)) ? (1) : (0);
|
||||
|
||||
pin_function(pin, f);
|
||||
|
||||
return (1UL << ((int)pin >> PIN_SHIFT & 0x1F));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue