mirror of https://github.com/ARMmbed/mbed-os.git
Refactored bits of gpio_api.c
In between the last two commits, I added debugging lines using serial to try and locate the line of code that was causing the issues with GPIO. However, didn't get anywhere with this because the gpio_write function is defined in a header file, rather than in an implementation file, so the printf function can't go there. As a result, it's just refactoring.pull/17/head
parent
c703096234
commit
66ca1c9db2
|
@ -63,7 +63,9 @@ void gpio_init(gpio_t *obj, PinName pin, PinDirection direction) {
|
|||
obj->reg_in = &port_reg->DATA;
|
||||
obj->reg_data= &port_reg->DATA;
|
||||
|
||||
|
||||
gpio_dir(obj, direction);
|
||||
|
||||
switch (direction) {
|
||||
case PIN_OUTPUT: pin_mode(pin, PullNone); break;
|
||||
case PIN_INPUT : pin_mode(pin, PullDown); break;
|
||||
|
|
Loading…
Reference in New Issue