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

`digitalWrite` has a wrong signature

Open Avamander opened this issue 5 years ago • 2 comments
trafficstars

Currently MegaAVR is one of the very few platforms where digitalWrite doesn't take a boolean for digitalWrite (there's no digitalWrite(uint8_t pin, bool val)), this causes unnecessary incompatibility with a massive selection of libraries out there.

The function's signature should either be changed or the core should overload the function.

Avamander avatar Feb 11 '20 12:02 Avamander

The latest release (1.8.6) should have this issue fixed.

MCUdude avatar Apr 07 '20 12:04 MCUdude

So does attachInterrupt and, as usual, there's no actual signature in the docs, just the usual Arduino noob stuff. Usable ISO/IEC style docs would be nice but I guess that would confuse people who think everything should be type 'int'.

Michael-Brodsky avatar Apr 20 '22 13:04 Michael-Brodsky