We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apparent pull mode of P3,4,6,7,10 after display.disable()
To see if mode is down or none connect a dangling lead to e.g. P3. Universal hex test-pin3.hex.zip outputs display pin values, without setting pull.
With the code below, DMESG enabled, and DMESG("setPull %p = %d", this, (int) pullMode); added to setPull, I see the output below. https://github.com/lancaster-university/codal-nrf52/blob/84b1aeec870addcfb6027a924dbfe83f1f10c6db/source/NRF52Pin.cpp#L701
DMESG("setPull %p = %d", this, (int) pullMode);
The only setPulls after disabling the display are for P0,P1,P2,P9. It seems the display pins are already configured as digital inputs, so return here https://github.com/lancaster-university/codal-nrf52/blob/84b1aeec870addcfb6027a924dbfe83f1f10c6db/source/NRF52Pin.cpp#L279 but in any case their pullMode member is None because of this
codal-microbit-v2/model/MicroBitIO.cpp
Line 104 in 1bb648e
codal-microbit-v2/source/NRF52LedMatrix.cpp
Line 168 in 1bb648e
When the pull mode is none, all display pins show the same value when one pin is connected.
0 0x20002638 1 0x20002650 2 0x20002668 3 0x20002680 4 0x20002698 6 0x200026C8 7 0x200026E0 9 0x20002710 10 0x20002728 setPull 0x20002638 = 1 setPull 0x20002650 = 1 setPull 0x20002668 = 1 setPull 0x20002710 = 1 0,0,0,1,1,1,1,0,1 0,0,0,1,1,1,1,0,1 0,0,0,1,1,1,1,0,1 0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0
#include "MicroBit.h" #include "codaldmesg.h" #ifndef MICROBIT_CODAL #ifdef CODAL_CONFIG_H #define MICROBIT_CODAL 1 #else #define MICROBIT_CODAL 0 #endif #endif MicroBit uBit; #if MICROBIT_CODAL #define mypullNONE PullMode::None #define mypullDOWN PullMode::Down #else #define mypullNONE PullNone #define mypullDOWN PullDown #endif #undef MYPULL //#define MYPULL mypullNONE //#define MYPULL mypullDOWN void forever() { uBit.display.disable(); //#ifdef MYPULL // uBit.io.P3.setPull( MYPULL); // uBit.io.P4.setPull( MYPULL); // uBit.io.P6.setPull( MYPULL); // uBit.io.P7.setPull( MYPULL); // uBit.io.P9.setPull( MYPULL); // uBit.io.P10.setPull( MYPULL); //#endif DMESG( "0 %p", &uBit.io.P0); DMESG( "1 %p", &uBit.io.P1); DMESG( "2 %p", &uBit.io.P2); DMESG( "3 %p", &uBit.io.P3); DMESG( "4 %p", &uBit.io.P4); DMESG( "6 %p", &uBit.io.P6); DMESG( "7 %p", &uBit.io.P7); DMESG( "9 %p", &uBit.io.P9); DMESG( "10 %p", &uBit.io.P10); while (true) { ManagedString str; str = str + ManagedString( (int) uBit.io.P0.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P1.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P2.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P3.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P4.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P6.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P7.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P9.getDigitalValue()) + ","; str = str + ManagedString( (int) uBit.io.P10.getDigitalValue()); DMESG( str.toCharArray()); uBit.sleep(100); } } int main() { uBit.init(); create_fiber( forever); release_fiber(); return 0; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Apparent pull mode of P3,4,6,7,10 after display.disable()
To see if mode is down or none connect a dangling lead to e.g. P3. Universal hex test-pin3.hex.zip outputs display pin values, without setting pull.
With the code below, DMESG enabled, and
DMESG("setPull %p = %d", this, (int) pullMode);
added to setPull, I see the output below.https://github.com/lancaster-university/codal-nrf52/blob/84b1aeec870addcfb6027a924dbfe83f1f10c6db/source/NRF52Pin.cpp#L701
The only setPulls after disabling the display are for P0,P1,P2,P9. It seems the display pins are already configured as digital inputs, so return here
https://github.com/lancaster-university/codal-nrf52/blob/84b1aeec870addcfb6027a924dbfe83f1f10c6db/source/NRF52Pin.cpp#L279
but in any case their pullMode member is None because of this
codal-microbit-v2/model/MicroBitIO.cpp
Line 104 in 1bb648e
and
codal-microbit-v2/source/NRF52LedMatrix.cpp
Line 168 in 1bb648e
When the pull mode is none, all display pins show the same value when one pin is connected.
The text was updated successfully, but these errors were encountered: