diff options
Diffstat (limited to '')
-rw-r--r-- | led.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -9,7 +9,7 @@ led::led(gpio *pin, led::color color) : _pin(pin), _color(color) { - _pin->set_mode(0); + _pin->set_mode(0); // output } @@ -45,9 +45,9 @@ void led::set(unsigned s) _pin->set(s); } -unsigned led::read() const +unsigned led::is_set() const { - return _pin->read(); + return _pin->is_set(); } void led::toggle() @@ -74,7 +74,7 @@ std::string led::to_string() } str += ") is "; - str += (read()) ? "on" : "off"; + str += (is_set()) ? "on" : "off"; return str; } |