In the file
.platformio\packages\framework-arduino-samd-sparkfun\variants\SparkFun_Qwiic_Micro\variant.h
is the macro
#define analogInputToDigitalPin(p) ((p < 6u) ? (p) + 22u : -1)
and little further on is the macro
#define PIN_A0 (24u)
I think the +22u in analogInputToDigitalPin(p) should be +24u.
Am I missing something?