mirror of https://github.com/ARMmbed/mbed-os.git
Add support for open drain leds
parent
b2f409c652
commit
ca4937d40d
|
@ -67,6 +67,13 @@ void gpio_init(gpio_t *obj, PinName name)
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -2782,7 +2782,7 @@
|
|||
"MAX32625MBED": {
|
||||
"inherits": ["Target"],
|
||||
"core": "Cortex-M4F",
|
||||
"macros": ["__SYSTEM_HFX=96000000","TARGET=MAX32625","TARGET_REV=0x4132"],
|
||||
"macros": ["__SYSTEM_HFX=96000000","TARGET=MAX32625","TARGET_REV=0x4132", "OPEN_DRAIN_LEDS"],
|
||||
"extra_labels": ["Maxim", "MAX32625"],
|
||||
"supported_toolchains": ["GCC_ARM", "IAR", "ARM"],
|
||||
"device_has": ["ANALOGIN", "I2C", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "STDIO_MESSAGES"],
|
||||
|
|
Loading…
Reference in New Issue