We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b9faf6 commit 01443c3Copy full SHA for 01443c3
.gitignore
@@ -0,0 +1 @@
1
+.vscode/
api/Common.h
@@ -2,6 +2,11 @@
2
#include <stdint.h>
3
#include <stdbool.h>
4
5
+#ifdef __cplusplus
6
+#define pHIGH ((bool)0x1)
7
+#define pLOW ((bool)0x0)
8
+#endif
9
+
10
#ifdef __cplusplus
11
extern "C"{
12
#endif
@@ -94,6 +99,12 @@ typedef uint8_t pin_size_t;
94
99
95
100
96
101
void pinMode(pin_size_t pinNumber, PinMode pinMode);
102
+__inline int digitalToggle(uint8_t pin)
103
+{
104
+ int sat = digitalRead(pin);
105
+ digitalWrite(pin, (PinStatus)!sat);
106
+ return !sat;
107
+}
97
108
void digitalWrite(pin_size_t pinNumber, PinStatus status);
98
109
PinStatus digitalRead(pin_size_t pinNumber);
110
int analogRead(pin_size_t pinNumber);
0 commit comments