this PR should be applied in the 'namespace' branch too: https://github.com/arduino/ArduinoCore-API/pull/104