cpu/cc2538/periph/gpio: fix gpio_init() bugs in cfed0e3
This commit is contained in:
parent
551cb3365c
commit
7b8c86ec16
@ -369,10 +369,11 @@ int gpio_init(gpio_t dev, gpio_mode_t mode)
|
|||||||
gpio_dir_input(pin);
|
gpio_dir_input(pin);
|
||||||
/* configure the pin's pull resistor state */
|
/* configure the pin's pull resistor state */
|
||||||
IOC_PXX_OVER[pin] = (IOC_OVERRIDE_PUE);
|
IOC_PXX_OVER[pin] = (IOC_OVERRIDE_PUE);
|
||||||
|
break;
|
||||||
case GPIO_OUT:
|
case GPIO_OUT:
|
||||||
gpio_dir_output(pin);
|
gpio_dir_output(pin);
|
||||||
/* configure the pin's pull resistor state */
|
/* configure the pin's pull resistor state */
|
||||||
IOC_PXX_OVER[pin] = (IOC_OVERRIDE_OE | IOC_OVERRIDE_DIS);
|
IOC_PXX_OVER[pin] = (IOC_OVERRIDE_OE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user