Practice at preparing library https://developer-sjc-cyan-border.mbed.org/cookbook/Writing-a-Library
Flasher.h@0:15ab39b909c6, 2018-06-15 (annotated)
- Committer:
- denbigh1974
- Date:
- Fri Jun 15 21:49:46 2018 +0000
- Revision:
- 0:15ab39b909c6
First issue of Flasher library (test)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
denbigh1974 | 0:15ab39b909c6 | 1 | |
denbigh1974 | 0:15ab39b909c6 | 2 | #ifndef MBED_FLASHER_H |
denbigh1974 | 0:15ab39b909c6 | 3 | #define MBED_FLASHER_H |
denbigh1974 | 0:15ab39b909c6 | 4 | |
denbigh1974 | 0:15ab39b909c6 | 5 | #include "mbed.h" |
denbigh1974 | 0:15ab39b909c6 | 6 | |
denbigh1974 | 0:15ab39b909c6 | 7 | class Flasher { |
denbigh1974 | 0:15ab39b909c6 | 8 | public: |
denbigh1974 | 0:15ab39b909c6 | 9 | Flasher(PinName pin); |
denbigh1974 | 0:15ab39b909c6 | 10 | void flash(int n); |
denbigh1974 | 0:15ab39b909c6 | 11 | |
denbigh1974 | 0:15ab39b909c6 | 12 | private: |
denbigh1974 | 0:15ab39b909c6 | 13 | DigitalOut _pin; |
denbigh1974 | 0:15ab39b909c6 | 14 | }; |
denbigh1974 | 0:15ab39b909c6 | 15 | |
denbigh1974 | 0:15ab39b909c6 | 16 | #endif |