arduino / ArduinoCore-renesas

MIT License
107 stars 74 forks source link

[Uno R4 minima] GPIO open drain mode select bug #343

Open supertnt318 opened 2 months ago

supertnt318 commented 2 months ago

For uno minima, when configuring GPIO with pinMode() function, there is a bug when configured using OUTPUT_OPENDRAIN PinMode.

The fix would be to replace line:

https://github.com/arduino/ArduinoCore-renesas/blob/4e60678ad7286a8c74caa966e479e64c0c09de09/cores/arduino/digital.cpp#L16

with:

#if UNO
R_IOPORT_PinCfg(NULL, g_pin_cfg[pin].pin, IOPORT_CFG_PORT_DIRECTION_OUTPUT | IOPORT_CFG_NMOS_ENABLE);
rowingdude commented 1 month ago

I opened a PR to address this.