MbedIOTest(Kindleの本を参考にしている)

main.cpp

Committer:
kasistorange
Date:
2018-10-15
Revision:
0:6143877436c1

File content as of revision 0:6143877436c1:

#include "mbed.h"

DigitalOut led1(LED1);

void led1_thread(void const *argument)
{
        while(true){
            led1=!led1;
            Thread::wait(1000);
        }
    }
    
    int main(){
            Thread thread(led1_thread);
            while(true){
                printf("main thread \r\n");
                Thread::wait(2000);
            }
        }