mirror of
https://github.com/CovidBraceletPrj/CovidBracelet.git
synced 2025-01-08 04:14:25 +01:00
Storage: Add 3 byte for metadata to record_t and use it in initialization for ens_fs
This commit is contained in:
parent
a9e7c6354d
commit
3abbc61757
@ -109,8 +109,7 @@ int init_record_storage(void) {
|
||||
printk("Currently %d contacts stored!\n", record_information.count);
|
||||
printk("Space available: %d\n", FLASH_AREA_SIZE(storage));
|
||||
|
||||
// TODO lome: change size to sizeof(contact_struct)
|
||||
rc = ens_fs_init(&ens_fs, FLASH_AREA_ID(ens_storage), 32);
|
||||
rc = ens_fs_init(&ens_fs, FLASH_AREA_ID(ens_storage), sizeof(record_t));
|
||||
if (rc) {
|
||||
printk("Cannot init ens_fs (err %d)\n", rc);
|
||||
}
|
||||
|
@ -14,6 +14,10 @@ typedef struct record {
|
||||
rssi_t rssi; // TODO: Check correct
|
||||
rolling_proximity_identifier_t rolling_proximity_identifier;
|
||||
associated_encrypted_metadata_t associated_encrypted_metadata;
|
||||
/**
|
||||
* Filler space, used for storing up to 3 byte of metadata in the filesystem.
|
||||
*/
|
||||
uint8_t meta[3];
|
||||
} record_t;
|
||||
|
||||
typedef struct stored_records_information {
|
||||
|
Loading…
x
Reference in New Issue
Block a user