summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-08-10 15:24:24 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-08-10 15:24:24 +0800
commit871234ec06f57fbf6030589f399087a670b13c28 (patch)
treeaf1689008e9701b09c220c7dfa072d6d50640de0
parentdac8510ded3c1745e19722a2184927273a579d92 (diff)
downloadfpm-door-lock-871234ec06f57fbf6030589f399087a670b13c28.tar.gz
Fix fpm_init: no point in waiting for timeout.
-rw-r--r--fpm.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fpm.c b/fpm.c
index e85ee94..862b938 100644
--- a/fpm.c
+++ b/fpm.c
@@ -162,16 +162,7 @@ static inline uint8_t img2tz(uint8_t bufid)
uint8_t fpm_init(void)
{
- uint8_t rc, wt = 100;
- uint16_t dt = 0;
-
- do {
- rc = check_pwd();
- dt += wt;
- _delay_ms(wt);
- } while (rc == 0 && dt < 500);
-
- return rc;
+ return check_pwd();
}
uint8_t fpm_get_cfg(struct fpm_cfg *cfg)