essai

main.cpp

Committer:
gr91
Date:
2020-11-15
Revision:
5:bb583c3b1c58
Parent:
4:5974db399f25

File content as of revision 5:bb583c3b1c58:

/* mbed Microcontroller Library
 * Copyright (c) 2019 ARM Limited
 * SPDX-License-Identifier: Apache-2.0
 */

#include "mbed.h"
#include <cstdio>

#define WAIT_TIME_MS 500 
DigitalOut led1(LED1);
int a=0;
int main()
{
    volatile static int b;
    volatile int c;
    printf("This is the bare metal blinky example running on Mbed OS %d.%d.%d.\n", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION);
    while (true)
    {
        a=a+1234;  ////
        c=a;
        b=c;
        led1 = !led1;
        printf( " a=%d ; b=%d ; c=%d \r\n",a,b,c);
        //thread_sleep_for(WAIT_TIME_MS);
        wait_us(1000000);
    }
}