summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-06-14 16:55:49 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-06-14 16:55:49 +0800
commitf71f9f83b032695f6d27cacf7d21774ebe15ca01 (patch)
tree9f29a07b1c15c60f80cf22c410ccbada87506f57
parentb0323b1b23ce955fd1d65cc6f7625ff6ca65fc5f (diff)
downloadfpm-door-lock-f71f9f83b032695f6d27cacf7d21774ebe15ca01.tar.gz
Rearrange defines.
-rw-r--r--main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/main.c b/main.c
index d2366fc..515a19e 100644
--- a/main.c
+++ b/main.c
@@ -7,6 +7,20 @@
#include "fpm.h"
+#define SERVO_PIN PB1
+#define SERVO_DDR DDRB
+
+#define PWM_MIN 500
+#define PWM_MID 1600
+#define PWM_MAX 2550
+#define PWM_TOP 20000
+
+#define VCC_MIN 4900
+
+#define LED_PIN PB5
+#define LED_DDR DDRB
+#define LED_PORT PORTB
+
#define FRONT_UNLOCK_PIN PD2
#define FRONT_LOCK_PIN PD3
#define ENROLL_PIN PD4
@@ -25,20 +39,6 @@
#define BACK_UNLOCK_INT PCINT22
#define BTN_INT_VEC PCINT2_vect
-#define SERVO_PIN PB1
-#define SERVO_DDR DDRB
-
-#define PWM_MIN 500
-#define PWM_MID 1600
-#define PWM_MAX 2550
-#define PWM_TOP 20000
-
-#define VCC_MIN 4900
-
-#define LED_PIN PB5
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-
static volatile int frnt_lock = 0;
static volatile int back_lock = 0;
static volatile int frnt_unlock = 0;