ArduinoCore-renesas icon indicating copy to clipboard operation
ArduinoCore-renesas copied to clipboard

[Uno R4 minima] GPIO open drain mode select bug

Open supertnt318 opened this issue 1 year ago • 1 comments

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);

supertnt318 avatar Jun 14 '24 15:06 supertnt318

I opened a PR to address this.

rowingdude avatar Aug 07 '24 15:08 rowingdude