summaryrefslogtreecommitdiffstats
path: root/stm32/app/pins.h
diff options
context:
space:
mode:
Diffstat (limited to 'stm32/app/pins.h')
-rw-r--r--stm32/app/pins.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/stm32/app/pins.h b/stm32/app/pins.h
index 954396f..41fd0a1 100644
--- a/stm32/app/pins.h
+++ b/stm32/app/pins.h
@@ -49,6 +49,7 @@
#define CLEAR(a) gpio_clear( a ## _PORT, a)
#define SET(a) gpio_set( a ## _PORT, a)
#define GET(a) gpio_get( a ## _PORT, a)
+#define WRITE(a,b) do { if (b) SET(a); else CLEAR(a) } while (0)
#define TOGGLE(a) gpio_toggle( a ## _PORT, a)
#endif