mbed
Fork of mbed-dev by
Diff: targets/TARGET_Maxim/TARGET_MAX32630/gpio_api.c
- Revision:
- 172:89b338f31ef1
- Parent:
- 157:ff67d9f36b67
--- a/targets/TARGET_Maxim/TARGET_MAX32630/gpio_api.c Thu Aug 03 13:13:39 2017 +0100 +++ b/targets/TARGET_Maxim/TARGET_MAX32630/gpio_api.c Wed Aug 16 18:27:13 2017 +0100 @@ -67,6 +67,13 @@ void gpio_mode(gpio_t *obj, PinMode mode) { +#ifdef OPEN_DRAIN_LEDS + if ((obj->name == LED1) || (obj->name == LED2) || + (obj->name == LED3) || (obj->name == LED4)) { + mode = OpenDrain; + } +#endif + obj->mode = mode; pin_mode(obj->name, mode); }