Speeduino
Loading...
Searching...
No Matches
fastOutputPin.h
Go to the documentation of this file.
1#pragma once
2#include "port_pin.h"
3
10{
11public:
13 void setPin(uint8_t pin, uint8_t mode = OUTPUT) noexcept {
14 _pin = port_pin_t(pin, mode);
15 }
16
18 void setPinHigh(void) noexcept {
19 _pin.setPinHigh();
20 }
21
23 void setPinLow(void) noexcept {
24 _pin.setPinLow();
25 }
26
28 bool isValid(void) const noexcept {
29 return _pin.isValid();
30 }
31
32#if !defined(UNIT_TEST)
33private:
34#endif
35 port_pin_t _pin;
36};
A class for output pin operations that is faster than standard Arduino digitalWrite()
Definition fastOutputPin.h:10
void setPin(uint8_t pin, uint8_t mode=OUTPUT) noexcept
Set the output pin.
Definition fastOutputPin.h:13
void setPinHigh(void) noexcept
Set the pin high.
Definition fastOutputPin.h:18
void setPinLow(void) noexcept
Set the pin low.
Definition fastOutputPin.h:23
bool isValid(void) const noexcept
Is the pin set?
Definition fastOutputPin.h:28
Definition array.h:14
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:30
void setPinHigh(void) noexcept
Set the pin high.
Definition port_pin.cpp:17
void setPinLow(void) noexcept
Set the pin low.
Definition port_pin.cpp:29