|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <leds.hpp>
Public Types | |
| enum | LedPin { Green , Red , Blue } |
Public Member Functions | |
| Leds ()=default | |
| mockable | ~Leds ()=default |
| mockable void | init () |
| mockable void | set (LedPin pin, bool isSet) |
A class specifically for handling the wrapping of the digital pins connected to LEDs on the RoboMaster development board.
|
default |
|
default |
| void tap::gpio::Leds::init | ( | ) |
Initializes the LEDs by putting the pins in output mode and settting all the pins to low.
| void tap::gpio::Leds::set | ( | Leds::LedPin | pin, |
| bool | isSet | ||
| ) |
Sets a given led to either high or low.
isSet=true) will turn the LED off and setting an LED to low (isSet=false) will turn the LED on. | [in] | pin | the LED to set |
| [in] | isSet | true if you want to turn the LED off, false if you want to turn the LED on. |