LIB Test
SPS.cpp@1:be96d2db8c03, 2016-04-17 (annotated)
- Committer:
- rs27
- Date:
- Sun Apr 17 08:05:29 2016 +0000
- Revision:
- 1:be96d2db8c03
- Parent:
- 0:bacf7305d459
Stand 17.04.2016
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rs27 | 0:bacf7305d459 | 1 | #include "SPS.h" |
rs27 | 0:bacf7305d459 | 2 | #include "mbed.h" |
rs27 | 0:bacf7305d459 | 3 | |
rs27 | 1:be96d2db8c03 | 4 | SPS::SPS(PinName pin) : _pin(pin) |
rs27 | 1:be96d2db8c03 | 5 | { |
rs27 | 0:bacf7305d459 | 6 | _pin = 0; |
rs27 | 0:bacf7305d459 | 7 | } |
rs27 | 0:bacf7305d459 | 8 | |
rs27 | 1:be96d2db8c03 | 9 | void SPS::flash(int n) |
rs27 | 1:be96d2db8c03 | 10 | { |
rs27 | 0:bacf7305d459 | 11 | for(int i=0; i<n*2; i++) { |
rs27 | 0:bacf7305d459 | 12 | _pin = !_pin; |
rs27 | 0:bacf7305d459 | 13 | wait(0.2); |
rs27 | 0:bacf7305d459 | 14 | } |
rs27 | 0:bacf7305d459 | 15 | } |