Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
tap::gpio::Leds Class Reference

#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)
 

Detailed Description

A class specifically for handling the wrapping of the digital pins connected to LEDs on the RoboMaster development board.

Member Enumeration Documentation

◆ LedPin

The LEDs correspond to the color on the RoboMaster type C board.

Enumerator
Green 
Red 
Blue 

Constructor & Destructor Documentation

◆ Leds()

tap::gpio::Leds::Leds ( )
default

◆ ~Leds()

mockable tap::gpio::Leds::~Leds ( )
default

Member Function Documentation

◆ init()

void tap::gpio::Leds::init ( )

Initializes the LEDs by putting the pins in output mode and settting all the pins to low.

◆ set()

void tap::gpio::Leds::set ( Leds::LedPin  pin,
bool  isSet 
)

Sets a given led to either high or low.

Note
setting an LED to high (isSet=true) will turn the LED off and setting an LED to low (isSet=false) will turn the LED on.
Parameters
[in]pinthe LED to set
[in]isSettrue if you want to turn the LED off, false if you want to turn the LED on.

The documentation for this class was generated from the following files: