/

Committer:
djukicic
Date:
Sun Feb 21 17:26:19 2021 +0000
Revision:
0:827af283d6f0
/

Who changed what in which revision?

UserRevisionLine numberNew contents of line
djukicic 0:827af283d6f0 1 #include "led.h"
djukicic 0:827af283d6f0 2 #include "mbed.h"
djukicic 0:827af283d6f0 3 LED::LED(PinName pin) : _pin(pin)
djukicic 0:827af283d6f0 4 {
djukicic 0:827af283d6f0 5 _pin = 0;
djukicic 0:827af283d6f0 6 }
djukicic 0:827af283d6f0 7
djukicic 0:827af283d6f0 8 //Metoda određuje stanje LED
djukicic 0:827af283d6f0 9 void LED::status(int status)
djukicic 0:827af283d6f0 10 {
djukicic 0:827af283d6f0 11 _pin = status;
djukicic 0:827af283d6f0 12 }
djukicic 0:827af283d6f0 13
djukicic 0:827af283d6f0 14
djukicic 0:827af283d6f0 15 //Metoda mijenja stanje na LED
djukicic 0:827af283d6f0 16 void LED::flip()
djukicic 0:827af283d6f0 17 {
djukicic 0:827af283d6f0 18 _pin = !_pin;
djukicic 0:827af283d6f0 19 }