Skip to content
New issue

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

Mbed OS 6 Docs | Power Optimization Tutorial contains deprecated wait_ms() #1514

Open
cbusse1 opened this issue Apr 20, 2023 · 0 comments
Open

Comments

@cbusse1
Copy link

cbusse1 commented Apr 20, 2023

Mbed OS 6 Docs | Power Optimization Tutorial contains deprecated wait_ms()

Page link

https://os.mbed.com/docs/mbed-os/v6.16/apis/power-optimization.html

Expected to find...

#include "mbed.h"

DigitalOut led(LED1);

int main() {
    while (1) {
        // blink the LED
        led = !led;
        // sleep for two seconds
        ThisThread::sleep_for(2s);
    }
}

Found

#include "mbed.h"

DigitalOut led(LED1);

int main() {
    while (1) {
        // blink the LED
        led = !led;
        // sleep for two seconds
        wait_ms(2000);
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant