1st mbed library built - mbed Flasher

Committer:
tothbuiaelliott
Date:
Wed Jul 13 13:59:05 2011 +0000
Revision:
0:446c73b5555a

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tothbuiaelliott 0:446c73b5555a 1 #include "Flasher.h"
tothbuiaelliott 0:446c73b5555a 2 #include "mbed.h"
tothbuiaelliott 0:446c73b5555a 3
tothbuiaelliott 0:446c73b5555a 4 Flasher::Flasher(PinName pin) : _pin(pin) {
tothbuiaelliott 0:446c73b5555a 5 _pin = 0;
tothbuiaelliott 0:446c73b5555a 6 }
tothbuiaelliott 0:446c73b5555a 7
tothbuiaelliott 0:446c73b5555a 8 void Flasher::flash(int n) {
tothbuiaelliott 0:446c73b5555a 9 for(int i = 0; i < n*2; n++) {
tothbuiaelliott 0:446c73b5555a 10 _pin = !_pin;
tothbuiaelliott 0:446c73b5555a 11 wait(0.2);
tothbuiaelliott 0:446c73b5555a 12 }
tothbuiaelliott 0:446c73b5555a 13
tothbuiaelliott 0:446c73b5555a 14 }
tothbuiaelliott 0:446c73b5555a 15