summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-06-09 10:34:23 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-06-09 10:34:23 +0800
commit254f0ef5d9f49d31390247978b61cf4d8958af06 (patch)
tree99590da54d798f9e3d82703b74179f056335b737 /main.c
parent43ee95716e4010e452c835184d76e95db6335f4f (diff)
downloadfpm-door-lock-254f0ef5d9f49d31390247978b61cf4d8958af06.tar.gz
Use define for servo DDR.
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index f805c48..d79dc0d 100644
--- a/main.c
+++ b/main.c
@@ -26,6 +26,7 @@
#define BTN_INT_VEC PCINT2_vect
#define SERVO_PIN PB1
+#define SERVO_DDR DDRB
#define PWM_MIN 500
#define PWM_MID 1500
@@ -62,7 +63,7 @@ int main(void)
TCCR1A |= (1 << WGM11) | (1 << COM1A1);
TCCR1B |= (1 << WGM13) | (1 << CS11);
- DDRB |= (1 << SERVO_PIN);
+ SERVO_DDR |= (1 << SERVO_PIN);
fpm_init();
sei();