|
CrossGuard
|
Controls an LED connected to a GPIO pin. More...
#include <LED.h>
Public Member Functions | |
| LED (int pin) | |
| Constructor that initializes an LED object attached to a specified GPIO pin. | |
| void | on () |
| Turns the LED on by setting the GPIO pin high. | |
| void | off () |
| Turns the LED off by setting the GPIO pin low. | |
Controls an LED connected to a GPIO pin.
This class provides methods to turn an LED on and off, abstracting the hardware interfacing details.
| LED::LED | ( | int | pin | ) |
Constructor that initializes an LED object attached to a specified GPIO pin.
Constructor for the LED class.
| pin | GPIO pin number that the LED is connected to. |
This constructor initializes the GPIO pin used by the LED and sets it to output mode, preparing the LED for use.
| pin | The GPIO pin number connected to the LED. |
| void LED::off | ( | ) |
| void LED::on | ( | ) |