John-Michael Reed
/
KL25Z_timer_issues
Testing timer issues
main.cpp
- Committer:
- vaxon
- Date:
- 2013-04-09
- Revision:
- 3:8ca8be33da99
- Parent:
- 2:2380496d04fd
File content as of revision 3:8ca8be33da99:
#include "mbed.h" DigitalOut led(PTB19); //green Serial pc(USBTX, USBRX); // tx, rx Ticker period; uint16_t j=0; void tick() { if (j<2500) { led=0; } else { led=1; } j++; j%=10000; } int main() { // period.attach_us(tick,100); // serial and blink work period.attach_us(tick,20); //nope while (1) { pc.printf("j: %d\n\r",j ); } }