Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
keybrd/src/LED_PinNumber.h

23 lines
475 B
C++

#ifndef LED_PINNUMBER_H
#define LED_PINNUMBER_H
#include <Arduino.h>
#include <inttypes.h>
#include <LED.h>
/* A LED_PinNumber object is an Aduino pin that is used to power an LED on and off.
*/
class LED_PinNumber: public LED
{
private:
const uint8_t pin;
public:
LED_PinNumber(const uint8_t pin): pin(pin)
{
pinMode(pin, OUTPUT);
}
virtual void on();
virtual void off();
};
#endif