diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-04-11 11:39:53 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-04-11 11:39:53 +0800 |
| commit | 31f41ecf75678e41a03f5aaf32e8e17ee81286e1 (patch) | |
| tree | 024778e5a8e20d2dbae4dbc778b593b503a38bf7 /lock/scan.c | |
| parent | 014040f33f914a82031e15940924bc9c92236fec (diff) | |
| download | smart-home-31f41ecf75678e41a03f5aaf32e8e17ee81286e1.tar.gz | |
Add keygen() to utils.
Diffstat (limited to 'lock/scan.c')
| -rw-r--r-- | lock/scan.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lock/scan.c b/lock/scan.c new file mode 100644 index 0000000..e375111 --- /dev/null +++ b/lock/scan.c @@ -0,0 +1,36 @@ +/* Lock front, connected to the fingerprint scanner */ + +#include <stdint.h> +#include <stdlib.h> + +#include <avr/interrupt.h> +#include <util/delay.h> + +#include "nrfm.h" +#include "uart.h" +#include "util.h" + +int main(void) +{ + uint8_t n; + uint8_t rxaddr[ADDRLEN] = { 194, 178, 82 }; + + char buf[WDLEN + 1], msg[WDLEN + 1]; + + /* timer for keygen */ + TCCR1A |= (1 << WGM11) | (1 << COM1A1); + TCCR1B |= (1 << WGM13) | (1 << CS11); + ICR1 = 20000; + + uart_init(); + radio_init(rxaddr); + radio_print_config(); + + sei(); + + for (;;) { + } + + return 0; +} + |
