Rev 20 DigitalIn mode function broken

17 May 2010 . Edited: 17 May 2010

The latest version of the mbed library (rev 20) seems to break the DigitalIn mode function.

In Version 19 this code worked:

#include "mbed.h"
DigitalOut myled(LED1);
DigitalIn myInput(p21);
int main() {
    myInput.mode(PullDown);
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}

In version 20 the following error is reported by the compiler:

" Undefined symbol mbed::DigitalIn::mode(PinMode) (referred from main.cpp.cpp.LPC1768.o). (EL6218E)" in file "/"

Please help.  I make extensive use of DigitalIn in all of my programs and now I cannot take advantage of the features of Rev 20 due to this apparant bug.

 

 

17 May 2010

Yep, I agree, its broken.

Some code that did work now won't compile unless I remove the 'msfSignal.mode(PullUp);' line.

Lynton

17 May 2010

Hi E, Lynoton,

Thanks for the report. We'll fix that tomorrow, and see why it slipped through the regression tests too.

FYI, you can always revert to the existing library where you have updated to the new one by:

  • Deleting the new "mbed" library from your project
  • Choosing "Import Library" and using the URL "http://mbed.org/projects/libraries/svn/mbed/trunk@19"

The @ specifies the svn version, so all previous library versions are always available. Hopefully this reassures you that you can at least revert to the exisiting library, even if you'll have to wait a day to get the advantage of the new libraries :)

Simon

17 May 2010

Simon,

I didn't realise we could revert back to a previous library so thanks for the info.

I've quickly revisited my clock code as mentioned in http://mbed.org/forum/helloworld/topic/700/ and can confirm the seconds on the RTC now appear to behave as I'd expect so thanks for that fix in the latest library.

I'll do some more detailed testing when the library is updated again and report back any issues.

Lynton

18 May 2010

Hi,

This should be fixed now; http://mbed.org/blog/entry/135/?page=1#comment-137

Sorry for the hiccup.

Simon

18 May 2010

Thanks Simon!  Your response time is impeccable.

 

18 May 2010

Great work Simon, all is good with DigitalIn again.

Thanks

Lynton