-

Dependents:   STM32F407_Semafor

Committer:
divicic
Date:
Thu Nov 26 07:51:35 2020 +0000
Revision:
0:a4fa725628ef
-

Who changed what in which revision?

UserRevisionLine numberNew contents of line
divicic 0:a4fa725628ef 1 #include "TrafficFlash.h"
divicic 0:a4fa725628ef 2 #include "mbed.h"
divicic 0:a4fa725628ef 3 TrafficFlash::TrafficFlash(PinName pin) : _pin(pin)
divicic 0:a4fa725628ef 4 {
divicic 0:a4fa725628ef 5 _pin = 0;
divicic 0:a4fa725628ef 6 }
divicic 0:a4fa725628ef 7 void TrafficFlash::flash(int n)
divicic 0:a4fa725628ef 8 {
divicic 0:a4fa725628ef 9 for(int i=0; i<n*2; i++) {
divicic 0:a4fa725628ef 10 _pin = !_pin;
divicic 0:a4fa725628ef 11 wait_us(10000);
divicic 0:a4fa725628ef 12 }
divicic 0:a4fa725628ef 13 }