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
- Committer:
- YCTung
- Date:
- 2016-02-22
- Revision:
- 1:b63700fbbf1f
- Parent:
- 0:40477eb0350c
File content as of revision 1:b63700fbbf1f:
/*LAB_LED*/
#include "mbed.h"
//LED1 = D13 = PA_5 (LED on Nucleo board)
DigitalOut led1(LED1);
DigitalOut led2(D12);
Ticker timer1;
void init_IO(void){
led1 = 0;
led2 = 1;
}
void timer1_interrupt(){
;
}
void init_TIMER(void){
timer1.attach_us(&timer1_interrupt, 1000.0);//1ms interrupt period (1 KHz)
}
int main() {
init_IO();
init_TIMER();
while(1) {
;
}
}