Loading...
Searching...
No Matches
ram.h
1/*
2 * Copyright (C) 2020 Koen Zandberg
3 * 2020 Inria
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
10#pragma once
11
33
34#include <stdint.h>
35
36#include "suit.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
45#ifndef CONFIG_SUIT_STORAGE_RAM_SIZE
46#define CONFIG_SUIT_STORAGE_RAM_SIZE (64U)
47#endif
48
52#ifndef CONFIG_SUIT_STORAGE_RAM_REGIONS
53#define CONFIG_SUIT_STORAGE_RAM_REGIONS (2U)
54#endif
55
59#ifndef CONFIG_SUIT_STORAGE_RAM_ATTR
60#define CONFIG_SUIT_STORAGE_RAM_ATTR
61#endif
62
66#ifndef CONFIG_SUIT_STORAGE_RAM_LOCATION_SEPARATOR
67#define CONFIG_SUIT_STORAGE_RAM_LOCATION_SEPARATOR '.'
68#endif
69
75#ifndef CONFIG_SUIT_STORAGE_RAM_LOCATION_PREFIX
76#define CONFIG_SUIT_STORAGE_RAM_LOCATION_PREFIX ".ram."
77#endif
78
86
99
100#ifdef __cplusplus
101}
102#endif
103
#define CONFIG_SUIT_STORAGE_RAM_REGIONS
Number of allocated regions.
Definition ram.h:53
#define CONFIG_SUIT_STORAGE_RAM_ATTR
Extra attributes for allocating the RAM struct.
Definition ram.h:60
#define CONFIG_SUIT_STORAGE_RAM_SIZE
Size of each memory region.
Definition ram.h:46
struct CONFIG_SUIT_STORAGE_RAM_ATTR suit_storage_ram_t
memory storage state
struct suit_storage suit_storage_t
Forward declaration for storage struct.
Definition storage.h:110
suit_storage_ram_region_t regions[CONFIG_SUIT_STORAGE_RAM_REGIONS]
ram storage regions
Definition ram.h:95
uint32_t sequence_no
Ephemeral sequence number.
Definition ram.h:97
suit_storage_t storage
parent struct
Definition ram.h:91
size_t active_region
Active region to write to.
Definition ram.h:96
Single in-memory storage region.
Definition ram.h:82
size_t occupied
Region space filled.
Definition ram.h:83
uint8_t mem[CONFIG_SUIT_STORAGE_RAM_SIZE]
RAM area.
Definition ram.h:84