At least tested with pins 13 and 14 don't return expected values.
define digitalPinToBitMask(P) ( (int)P < 8 ? _BV((int)P) : ( P < 16 ? _BV( (int)P-8 ) : 1) )
Fast look: when pin value is >=8 it is applying _BV( (int)P-8.. that will not return a good value.
Looks like code is oriented for 8 bit reg compatibility design with Arduino, however doesn't work for direct 32bit pin assignments needed for functions like GPIO_REG_WRITE.
At least tested with pins 13 and 14 don't return expected values.
define digitalPinToBitMask(P) ( (int)P < 8 ? _BV((int)P) : ( P < 16 ? _BV( (int)P-8 ) : 1) )
Fast look: when pin value is >=8 it is applying _BV( (int)P-8.. that will not return a good value.
Looks like code is oriented for 8 bit reg compatibility design with Arduino, however doesn't work for direct 32bit pin assignments needed for functions like GPIO_REG_WRITE.