Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
PinModeStatus.h
Go to the documentation of this file.
1/*
2Copyright (C) 2020, 2021 Bengt Martensson.
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation; either version 3 of the License, or (at
7your option) any later version.
8
9This program is distributed in the hope that it will be useful, but
10WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12General Public License for more details.
13
14You should have received a copy of the GNU General Public License along with
15this program. If not, see http://www.gnu.org/licenses/.
16 */
17
30#pragma once
31
32#if ! defined(ARDUINO)
33
34typedef enum {
35 LOW = 0,
36 HIGH = 1,
37 CHANGE = 2,
38 FALLING = 3,
39 RISING = 4,
40} PinStatus;
41
42typedef enum {
43 INPUT = 0x0,
44 OUTPUT = 0x1,
45 INPUT_PULLUP = 0x2,
46 INPUT_PULLDOWN = 0x3,
47} PinMode;
48
49#elif defined(LOW) || defined(DOXYGEN)// ARDUINO
50
52typedef int PinStatus;
53
55typedef int PinMode;
56
57#else
58
59// Is Arduino, but LOW is not defined.
60// We assume that PinStatus and PinMode are defined as enums.
61
62#endif
int PinMode
Different operating modes of a GPIO pin.
Definition: PinModeStatus.h:55
int PinStatus
Values of a digital pin.
Definition: PinModeStatus.h:52