#ifndef __LED_HPP__
#define __LED_HPP__

#include "./../csl/interfaces/pin.hpp"

template <typename T>
class LED
{
    public:

    LED(Pin<T>& pin) :
        pin(pin)
    {}

    void turnOn()
    {
        pin.set(true);
    }

    void turnOff()
    {
        pin.set(false);
    }

    void toggle()
    {
        pin.toggle();
    }

    private:

    Pin<T>& pin;
};

#endif // __LED_HPP__
