You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include "led.hpp"
|
|
|
|
Led::Led(Pin* pin_ptr)
|
|
{
|
|
pin = pin_ptr;
|
|
pin->init();
|
|
pin->setMode(Pin::mode::output);
|
|
pin->setSpeed(Pin::speed::fast);
|
|
}
|
|
|
|
Led::~Led()
|
|
{
|
|
|
|
}
|
|
|
|
void Led::on()
|
|
{
|
|
pin->write(true);
|
|
}
|
|
|
|
void Led::off()
|
|
{
|
|
pin->write(false);
|
|
}
|
|
|
|
void Led::toggle()
|
|
{
|
|
pin->toggle();
|
|
}
|
|
|