summaryrefslogtreecommitdiffstats
path: root/stm32/app/pins.h
diff options
context:
space:
mode:
authorroot <root@ka-ata-killa.panaceas.james.local>2021-11-22 11:23:35 +0000
committerroot <root@ka-ata-killa.panaceas.james.local>2021-11-22 11:23:35 +0000
commitf75d0b7eabe275a4330eb72dc4a4c5d2af1fb13d (patch)
tree0587532f19c2833d7ccbab1e63d74f6f7e39544e /stm32/app/pins.h
parent3028595801878f962bd362421ed3ec5af635ff45 (diff)
downloadmetric_clock-f75d0b7eabe275a4330eb72dc4a4c5d2af1fb13d.tar.gz
metric_clock-f75d0b7eabe275a4330eb72dc4a4c5d2af1fb13d.tar.bz2
metric_clock-f75d0b7eabe275a4330eb72dc4a4c5d2af1fb13d.zip
turn on cycle counter correctly, and add a for-real motor
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