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.
Dependencies: mbed
main.cpp
00001 /*LAB_LED*/ 00002 #include "mbed.h" 00003 00004 //LED1 = D13 = PA_5 (LED on Nucleo board) 00005 DigitalOut led1(LED1); 00006 DigitalOut led2(D12); 00007 00008 Ticker timer1; 00009 00010 void init_IO(void){ 00011 led1 = 0; 00012 led2 = 1; 00013 } 00014 00015 void timer1_interrupt(){ 00016 ; 00017 } 00018 00019 void init_TIMER(void){ 00020 timer1.attach_us(&timer1_interrupt, 1000.0);//1ms interrupt period (1 KHz) 00021 } 00022 00023 int main() { 00024 00025 init_IO(); 00026 init_TIMER(); 00027 00028 while(1) { 00029 ; 00030 } 00031 }
Generated on Sun Jul 24 2022 22:38:56 by
1.7.2