mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-26 08:05:10 +02:00
Add procedure to compute unique ID at startup.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -263,6 +263,9 @@ void scan_region(bool persistent) {
|
||||
}
|
||||
}
|
||||
void wait_flash_finish();
|
||||
#ifndef ENABLE_EMULATION
|
||||
extern uint16_t usb_vid, usb_pid;
|
||||
#endif
|
||||
void scan_flash() {
|
||||
initialize_flash(false); //soft initialization
|
||||
if (*(uintptr_t *) flash_read(end_rom_pool) == 0xffffffff &&
|
||||
@@ -278,6 +281,12 @@ void scan_flash() {
|
||||
printf("SCAN\n");
|
||||
scan_region(true);
|
||||
scan_region(false);
|
||||
#ifndef ENABLE_EMULATION
|
||||
file_t *ef_vp = search_dynamic_file(EF_VP);
|
||||
if (file_has_data(ef_vp)) {
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t *file_read(const uint8_t *addr) {
|
||||
|
||||
@@ -67,6 +67,10 @@
|
||||
#define EF_SKDFS 0x6045
|
||||
#define EF_META 0xE010
|
||||
|
||||
#ifndef ENABLE_EMULATION
|
||||
#define EF_VP 0xE020
|
||||
#endif
|
||||
|
||||
#define MAX_DEPTH 4
|
||||
|
||||
typedef PACK(struct file {
|
||||
|
||||
Reference in New Issue
Block a user