this should be applied https://github.com/arduino/ArduinoCore-API/pull/104 or this https://github.com/arduino/ArduinoCore-samd/pull/254