summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/main.c b/main.c
index 5f51edb..858034f 100644
--- a/main.c
+++ b/main.c
@@ -33,14 +33,30 @@ static inline void uart_write(const char *s)
int main(void)
{
+ struct fpm_cfg cfg;
+
cli();
Soft_UART_init();
bit_set(DDRB,5);
sei();
fpm_init();
+ fpm_get_cfg(&cfg);
+ fpm_clear_db();
+
if (fpm_get_count() == 0) {
- fpm_enroll();
+ // todo: check againstr capacity in prod
+ if (fpm_enroll(1)) {
+ fpm_led_on(BLUE);
+ _delay_ms(500);
+ fpm_led_off();
+ _delay_ms(500);
+ } else {
+ fpm_led_on(RED);
+ _delay_ms(500);
+ fpm_led_off();
+ _delay_ms(500);
+ }
}
while (1)