Speeduino
Loading...
Searching...
No Matches
inputPin.h
Go to the documentation of this file.
1#pragma once
2#include "digitalPin.h"
3
12{
13public:
15 void setPin(uint8_t pin, uint8_t mode = INPUT) noexcept {
16 _pin.setPin(pin, mode);
17 }
18
20 bool isPinHigh(void) const noexcept {
21 return _pin.isPinHigh();
22 }
23
25 bool isPinLow(void) const noexcept {
26 return _pin.isPinLow();
27 }
28
30 bool isValid(void) const {
31 return _pin.isValid();
32 }
33
34#if !defined(UNIT_TEST)
35private:
36#endif
37 digitalPin_t _pin;
38};
A class for input pin operations.
Definition digitalPin.h:14
bool isValid(void) const
Is the pin set?
Definition digitalPin.h:21
void setPin(uint8_t pin, uint8_t mode) noexcept
Set the input pin.
Definition digitalPin.cpp:7
bool isPinHigh(void) const noexcept
Check if the pin is set high.
Definition digitalPin.cpp:40
bool isPinLow(void) const noexcept
Check if the pin is set low.
Definition digitalPin.h:30
A class for input pin operations.
Definition inputPin.h:12
bool isPinLow(void) const noexcept
Check if the pin is set low.
Definition inputPin.h:25
bool isPinHigh(void) const noexcept
Check if the pin is set high.
Definition inputPin.h:20
void setPin(uint8_t pin, uint8_t mode=INPUT) noexcept
Set the input pin.
Definition inputPin.h:15
bool isValid(void) const
Is the pin set?
Definition inputPin.h:30
Definition array.h:14