: bharatvaj/forwarder-initiators

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 #ifndef _LED_H
#define _LED_H
#include <GPIO.hpp>
#include <fmt/format.h>
#include <unistd.h>
using namespace gpio;
class LED
{
  public:
    GPIO *g = nullptr;
    LED(GPIO *g) : g(g) { g->setDirection(Direction::OUT); }

    void on() { g->setHigh(); }

    void off() { g->setLow(); }
};
#endif