Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- JosephMarinier
- Date:
- 2017-02-03
- Revision:
- 1:a47e9e7852fd
- Parent:
- 0:e581bdd1b2a6
- Child:
- 2:99e36af00b06
File content as of revision 1:a47e9e7852fd:
#include "mbed.h" DigitalOut myled(LED1); BusOut leds(LED4, LED3, LED2, LED1); Ticker ticker; Thread *thread; #define periode 16 unsigned short out[period] = {0}; unsigned short t = 0; void tick() { leds = i; t = (t + 1) % period; } int main() { leds = 0b0000; ticker.attach(&tick, 0.01); thread = &Thread(); thread->start(tick); RTC::attach(tick, RTC::Second); } //https://docs.mbed.com/docs/mbed-os-api-reference/en/5.3/APIs/tasks/rtos/ //Semaphore(count) //int32_t wait(millisec) //osStatus release() //Mutex(); //osStatus lock(); //bool trylock(); //osStatus unlock();