Tipkalo Linija

Dependents:   Lilnija_29012017

Committer:
mario_meh
Date:
Wed Feb 08 08:36:23 2017 +0000
Revision:
2:9085093855f0
Parent:
0:9624782a02b3
zadnje izmjene pred predaju seminarskog zadatka

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 2:9085093855f0 3 #ifndef MBED_H
mario_meh 2:9085093855f0 4 #include "mbed.h"
mario_meh 2:9085093855f0 5 #endif
mario_meh 2:9085093855f0 6 #ifndef GLOBAL_NAZIVI_H
mario_meh 2:9085093855f0 7 #include "global_nazivi.h"
mario_meh 2:9085093855f0 8 #endif
mario_meh 0:9624782a02b3 9
mario_meh 2:9085093855f0 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 2:9085093855f0 14 } TTipkalo;
mario_meh 0:9624782a02b3 15
mario_meh 0:9624782a02b3 16 typedef struct t_status {
mario_meh 2:9085093855f0 17 TTipkalo pritisnut; // debounce
mario_meh 2:9085093855f0 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 2:9085093855f0 24 Tipkalo();
mario_meh 2:9085093855f0 25 void bStart();
mario_meh 2:9085093855f0 26 void blinkFall();
mario_meh 2:9085093855f0 27 void togglerOff();
mario_meh 2:9085093855f0 28 void blinkRise();
mario_meh 2:9085093855f0 29 void bStop();
mario_meh 2:9085093855f0 30 bool LStatus();
mario_meh 0:9624782a02b3 31 private:
mario_meh 2:9085093855f0 32 DigitalOut ledSec;
mario_meh 2:9085093855f0 33 InterruptIn pbutton;
mario_meh 2:9085093855f0 34 Ticker toggler;
mario_meh 2:9085093855f0 35 Timeout detachToggler;
mario_meh 2:9085093855f0 36 Timer t;
mario_meh 0:9624782a02b3 37 };
mario_meh 0:9624782a02b3 38
mario_meh 0:9624782a02b3 39 #endif /* TIPKALO_H */