Tipkalo Linija

Dependents:   Lilnija_29012017

Committer:
mario_meh
Date:
Wed Nov 22 08:51:34 2017 +0000
Revision:
3:b9ab9a191011
Parent:
0:9624782a02b3
reserved

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mario_meh 0:9624782a02b3 1 #ifndef TIPKALO_H
mario_meh 0:9624782a02b3 2 #define TIPKALO_H
mario_meh 3:b9ab9a191011 3 #ifndef MBED_H
mario_meh 3:b9ab9a191011 4 #include "mbed.h"
mario_meh 3:b9ab9a191011 5 #endif
mario_meh 3:b9ab9a191011 6 #ifndef GLOBAL_NAZIVI_H
mario_meh 3:b9ab9a191011 7 #include "global_nazivi.h"
mario_meh 3:b9ab9a191011 8 #endif
mario_meh 0:9624782a02b3 9
mario_meh 3:b9ab9a191011 10 #define t_milisec_pritisnut 50
mario_meh 0:9624782a02b3 11
mario_meh 0:9624782a02b3 12 typedef enum {
mario_meh 0:9624782a02b3 13 TDOLJE = 1, TGORE = 0, TNEZNAM = -1
mario_meh 3:b9ab9a191011 14 } TTipkalo;
mario_meh 0:9624782a02b3 15
mario_meh 0:9624782a02b3 16 typedef struct t_status {
mario_meh 3:b9ab9a191011 17 TTipkalo pritisnut; // debounce
mario_meh 3:b9ab9a191011 18 } TStatus;
mario_meh 0:9624782a02b3 19
mario_meh 0:9624782a02b3 20
mario_meh 0:9624782a02b3 21 //---------------TIPKALO------------------//
mario_meh 0:9624782a02b3 22 class Tipkalo {
mario_meh 0:9624782a02b3 23 public:
mario_meh 3:b9ab9a191011 24 Tipkalo();
mario_meh 3:b9ab9a191011 25 void bStart();
mario_meh 3:b9ab9a191011 26 void blinkFall();
mario_meh 3:b9ab9a191011 27 void togglerOff();
mario_meh 3:b9ab9a191011 28 void blinkRise();
mario_meh 3:b9ab9a191011 29 void bStop();
mario_meh 0:9624782a02b3 30 private:
mario_meh 3:b9ab9a191011 31 DigitalOut ledSec;
mario_meh 3:b9ab9a191011 32 InterruptIn pbutton;
mario_meh 3:b9ab9a191011 33 Ticker toggler;
mario_meh 3:b9ab9a191011 34 Timeout detachToggler;
mario_meh 3:b9ab9a191011 35 Timer t;
mario_meh 0:9624782a02b3 36 };
mario_meh 0:9624782a02b3 37
mario_meh 0:9624782a02b3 38 #endif /* TIPKALO_H */