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.
Fork of mbed-blinky-nucleo-f303k8 by
main.cpp
00001 #include "mbed.h" 00002 00003 #define TSample 0.001 00004 #define Periode 900 00005 #define onTime 10 00006 00007 DigitalOut led(LED1); 00008 DigitalOut son(PA_7); 00009 00010 int wdt = 0; 00011 char msg[] = "Salut artiste"; 00012 Ticker TMainProcess; 00013 00014 void MainProcess_Isr(void){ 00015 --wdt; 00016 if((wdt< onTime)& (wdt> 0)){led= 1;}; 00017 if(wdt<= 0){led= 0; wdt= Periode;}; 00018 } 00019 00020 void init(void){ 00021 // son= 1; 00022 TMainProcess.attach(&MainProcess_Isr, TSample); 00023 son= 0; 00024 } 00025 00026 00027 // main() runs in its own thread in the OS 00028 int main(void) { 00029 led= 0; 00030 TMainProcess.attach(&MainProcess_Isr, TSample); 00031 while (true) {}; 00032 return 3; 00033 } 00034
Generated on Thu Jul 21 2022 06:31:09 by
1.7.2
