aboutsummaryrefslogtreecommitdiff
path: root/keyclick.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-05-15 19:53:41 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-05-15 19:53:41 +0200
commit8bacb24bac1437bfb66db5bda2592b8794f6ed26 (patch)
tree53da6d812d3e86c378d5e4be8f92ee1ab8fbbe4b /keyclick.h
parent451f3164839fb609543431d23f37be457c2d3699 (diff)
downloadtmk7637-8bacb24bac1437bfb66db5bda2592b8794f6ed26.tar.gz
document how to build a solenoid driver and install a solenoid
* In contrast to the relay breakout board I was using before, the solenoid driver is HIGH-active, so some code had to be changed as well.
Diffstat (limited to 'keyclick.h')
-rw-r--r--keyclick.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/keyclick.h b/keyclick.h
index c7c7fd2..c88e313 100644
--- a/keyclick.h
+++ b/keyclick.h
@@ -38,13 +38,10 @@ extern enum keyclick_mode keyclick_mode;
static inline void
keyclick_solenoid_set(bool state)
{
- /*
- * NOTE: The solenoid/relay is LOW-active.
- */
if (state)
- PORTB &= ~(1 << PB3);
- else
PORTB |= (1 << PB3);
+ else
+ PORTB &= ~(1 << PB3);
}
#endif