And that being applied in the NRF52Pin constructor. But this only sets the internal state of the NRF52Pin instance, it is only applied on first usage of get/setDigitalValue, when the setPull method is actually called:
However the MicroBitIO constructor, which will be executed after all the NRF52Pins have been constructed, it sets the internal pull state of the edge connector pins to PullNone and applies it:
On issue https://github.com/lancaster-university/codal-microbit-v2/issues/357 we agreed that for V1 compatibility the pin pull downs should be enabled by default, as also discussed in https://github.com/lancaster-university/codal-microbit-v2/issues/17.
Looking at NRF52Pin, it is probably achieved by having the default state in target.json/target-locked.json: https://github.com/lancaster-university/codal-microbit-v2/blob/3fa546f7ef5fd34cb9167b41045f8d7b6235b67e/target.json#L26
And that being applied in the
NRF52Pin
constructor. But this only sets the internal state of theNRF52Pin
instance, it is only applied on first usage ofget
/setDigitalValue
, when thesetPull
method is actually called:However the
MicroBitIO
constructor, which will be executed after all theNRF52Pin
s have been constructed, it sets the internal pull state of the edge connector pins toPullNone
and applies it:https://github.com/lancaster-university/codal-microbit-v2/blob/4f2aedcd8e093e7ca9eefd574d4a647884e82505/model/MicroBitIO.cpp#L99-L101
So not 100% sure how the pull downs are configured by default.