rename LED_PinNumber to LED_uC
This commit is contained in:
parent
4fe2de25de
commit
689f3e6c4b
@ -1,11 +0,0 @@
|
|||||||
#include "LED_PinNumber.h"
|
|
||||||
|
|
||||||
void LED_PinNumber::on()
|
|
||||||
{
|
|
||||||
digitalWrite(pin, HIGH);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LED_PinNumber::off()
|
|
||||||
{
|
|
||||||
digitalWrite(pin, LOW);
|
|
||||||
}
|
|
11
src/LED_uC.cpp
Normal file
11
src/LED_uC.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "LED_uC.h"
|
||||||
|
|
||||||
|
void LED_uC::on()
|
||||||
|
{
|
||||||
|
digitalWrite(pin, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LED_uC::off()
|
||||||
|
{
|
||||||
|
digitalWrite(pin, LOW);
|
||||||
|
}
|
@ -1,18 +1,18 @@
|
|||||||
#ifndef LED_PINNUMBER_H
|
#ifndef LED_UC_H
|
||||||
#define LED_PINNUMBER_H
|
#define LED_UC_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <LED.h>
|
#include <LED.h>
|
||||||
|
|
||||||
/* A LED_PinNumber object is an Aduino pin that is used to power an LED on and off.
|
/* A LED_uC object is an Aduino pin that is used to power an LED on and off.
|
||||||
*/
|
*/
|
||||||
class LED_PinNumber: public LED
|
class LED_uC: public LED
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
const uint8_t pin;
|
const uint8_t pin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LED_PinNumber(const uint8_t pin): pin(pin)
|
LED_uC(const uint8_t pin): pin(pin)
|
||||||
{
|
{
|
||||||
pinMode(pin, OUTPUT);
|
pinMode(pin, OUTPUT);
|
||||||
}
|
}
|
Reference in New Issue
Block a user