Debounce_Library
antirrebote.h@1:8db2c2a203d9, 2018-05-23 (annotated)
- Committer:
- Tom_87
- Date:
- Wed May 23 00:01:12 2018 +0000
- Revision:
- 1:8db2c2a203d9
- Parent:
- 0:16d62113f1d5
_
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Tom_87 | 0:16d62113f1d5 | 1 | #ifndef _ANTIRREBOTE_H_ |
Tom_87 | 0:16d62113f1d5 | 2 | #define _ANTIRREBOTE_H_ |
Tom_87 | 0:16d62113f1d5 | 3 | #include "mbed.h" |
Tom_87 | 0:16d62113f1d5 | 4 | |
Tom_87 | 1:8db2c2a203d9 | 5 | enum{NO_APRETADO,ENCENDIDO=1, APRETADO, APAGADO = 0}; |
Tom_87 | 0:16d62113f1d5 | 6 | typedef int pinEstado_t; |
Tom_87 | 0:16d62113f1d5 | 7 | |
Tom_87 | 0:16d62113f1d5 | 8 | |
Tom_87 | 0:16d62113f1d5 | 9 | class AntReb{ |
Tom_87 | 0:16d62113f1d5 | 10 | |
Tom_87 | 0:16d62113f1d5 | 11 | public: |
Tom_87 | 0:16d62113f1d5 | 12 | |
Tom_87 | 0:16d62113f1d5 | 13 | AntReb(); |
Tom_87 | 0:16d62113f1d5 | 14 | ~AntReb(); |
Tom_87 | 0:16d62113f1d5 | 15 | |
Tom_87 | 0:16d62113f1d5 | 16 | pinEstado_t antiRebote(); |
Tom_87 | 0:16d62113f1d5 | 17 | |
Tom_87 | 0:16d62113f1d5 | 18 | void setPin(DigitalIn pin); |
Tom_87 | 0:16d62113f1d5 | 19 | |
Tom_87 | 0:16d62113f1d5 | 20 | private: |
Tom_87 | 0:16d62113f1d5 | 21 | |
Tom_87 | 0:16d62113f1d5 | 22 | |
Tom_87 | 0:16d62113f1d5 | 23 | char e_PULS; |
Tom_87 | 0:16d62113f1d5 | 24 | char P_PULS; |
Tom_87 | 0:16d62113f1d5 | 25 | |
Tom_87 | 0:16d62113f1d5 | 26 | }; |
Tom_87 | 0:16d62113f1d5 | 27 | |
Tom_87 | 0:16d62113f1d5 | 28 | #endif |