Speeduino
Loading...
Searching...
No Matches
fastInputPin.h
Go to the documentation of this file.
1#pragma once
2#include "port_pin.h"
3
10{
11public:
14
16 bool isPinHigh(void) const;
17
19 bool isPinLow(void) const
20 {
21 return !isPinHigh();
22 }
23
25 bool isValid(void) const
26 {
27 return _port_pin.isValid();
28 }
29
30private:
31 port_pin_t _port_pin;
32};
A class for input pin operations that is faster than standard Arduino digitalRead()
Definition fastInputPin.h:10
bool isPinLow(void) const
Check if the pin is set low.
Definition fastInputPin.h:19
bool isPinHigh(void) const
Check if the pin is set high.
Definition fastInputPin.cpp:17
void setPin(uint8_t pin, uint8_t mode=INPUT)
Set the input pin.
Definition fastInputPin.cpp:7
bool isValid(void) const
Is the pin set?
Definition fastInputPin.h:25
static TIntegral readSerialIntegralTimeout(void)
Reads an integral type, timing out if necessary.
Definition comms.cpp:175
A structure to support direct port manipulation.
Definition port_pin.h:23
bool isValid(void) const
Is the port register initialised?
Definition port_pin.h:36