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

Committer:
khodak
Date:
Sun Nov 15 18:55:08 2020 +0000
Revision:
0:f7dc5fd660f6
Simple led library that creates object LED with LED class and has a flip method to flip LED value from 0 to 1 and vice versa.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
khodak 0:f7dc5fd660f6 1 #ifndef MBED_LED_H
khodak 0:f7dc5fd660f6 2 #define MBED_LED_H
khodak 0:f7dc5fd660f6 3 #include "mbed.h"
khodak 0:f7dc5fd660f6 4 //Klasa za LED koja daje funkcije za mijenjanje stanja
khodak 0:f7dc5fd660f6 5 class LED
khodak 0:f7dc5fd660f6 6 {
khodak 0:f7dc5fd660f6 7 public:
khodak 0:f7dc5fd660f6 8 LED(PinName pin);
khodak 0:f7dc5fd660f6 9 void flip();
khodak 0:f7dc5fd660f6 10 private:
khodak 0:f7dc5fd660f6 11 DigitalOut _pin;
khodak 0:f7dc5fd660f6 12 };
khodak 0:f7dc5fd660f6 13 #endif