Tipkalo Linija
tipkalo.h
- Committer:
- mario_meh
- Date:
- 2017-02-08
- Revision:
- 2:9085093855f0
- Parent:
- 0:9624782a02b3
File content as of revision 2:9085093855f0:
#ifndef TIPKALO_H #define TIPKALO_H #ifndef MBED_H #include "mbed.h" #endif #ifndef GLOBAL_NAZIVI_H #include "global_nazivi.h" #endif #define t_milisec_pritisnut 50 typedef enum { TDOLJE = 1, TGORE = 0, TNEZNAM = -1 } TTipkalo; typedef struct t_status { TTipkalo pritisnut; // debounce } TStatus; //---------------TIPKALO------------------// class Tipkalo { public: Tipkalo(); void bStart(); void blinkFall(); void togglerOff(); void blinkRise(); void bStop(); bool LStatus(); private: DigitalOut ledSec; InterruptIn pbutton; Ticker toggler; Timeout detachToggler; Timer t; }; #endif /* TIPKALO_H */