Simple library, creates LED object using LED class, and gives it flip function that changes its value from 0 to 1 and vice versa.

Dependents:   Hodak_MorseCoder

led.cpp

Committer:
khodak
Date:
2020-11-15
Revision:
0:f7dc5fd660f6

File content as of revision 0:f7dc5fd660f6:

#include "led.h"
#include "mbed.h"
LED::LED(PinName pin) : _pin(pin)
{
    _pin = 0;
}
//Metoda mijenja stanje na LED
void LED::flip()
{
    _pin = !_pin;
}