summaryrefslogtreecommitdiffstats
path: root/lock/fpm.h
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-05-24 15:15:09 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-05-24 15:15:09 +0800
commit31c70ef771e5954dffc5629700e28a89e8ecd493 (patch)
tree5bd51a0d83363aaae42b55085de4c45862148f0c /lock/fpm.h
parent359b3abb10d57a0c7eca8cc7dea16f26f3359d33 (diff)
downloadsmart-home-31c70ef771e5954dffc5629700e28a89e8ecd493.tar.gz
Update FPM driver and enroll if there are no finger prints.
Diffstat (limited to 'lock/fpm.h')
-rw-r--r--lock/fpm.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/lock/fpm.h b/lock/fpm.h
index b3fcd91..1deca46 100644
--- a/lock/fpm.h
+++ b/lock/fpm.h
@@ -1,5 +1,5 @@
-#ifndef FPM_H
-#define FPM_H
+#ifndef FPM_R503_H
+#define FPM_R503_H
#include <stdint.h>
@@ -13,16 +13,26 @@ struct fpm_cfg {
uint16_t baud;
};
+typedef enum {
+ RED = 0x01,
+ BLUE = 0x02,
+ PURPLE = 0x03
+} COLOR;
+
uint8_t fpm_init(void);
-uint8_t fpm_getcfg(struct fpm_cfg *cfg);
+uint8_t fpm_get_cfg(struct fpm_cfg *cfg);
+
+uint8_t fpm_set_pwd(uint32_t pwd);
+
+void fpm_led_on(COLOR color);
-uint8_t fpm_setpwd(uint32_t pwd);
+void fpm_led_off(void);
-uint16_t fpm_getcount(void);
+uint16_t fpm_get_count(void);
uint8_t fpm_enroll(void);
uint8_t fpm_match(void);
-#endif /* FPM_H */
+#endif /* FPM_R50_H */