Loading...
Searching...
No Matches
ram.h
1/*
2 * SPDX-FileCopyrightText: 2020 Koen Zandberg
3 * SPDX-FileCopyrightText: 2020 Inria
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
30
31#include <stdint.h>
32
33#include "suit.h"
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
42#ifndef CONFIG_SUIT_STORAGE_RAM_SIZE
43#define CONFIG_SUIT_STORAGE_RAM_SIZE (64U)
44#endif
45
49#ifndef CONFIG_SUIT_STORAGE_RAM_REGIONS
50#define CONFIG_SUIT_STORAGE_RAM_REGIONS (2U)
51#endif
52
56#ifndef CONFIG_SUIT_STORAGE_RAM_ATTR
57#define CONFIG_SUIT_STORAGE_RAM_ATTR
58#endif
59
63#ifndef CONFIG_SUIT_STORAGE_RAM_LOCATION_SEPARATOR
64#define CONFIG_SUIT_STORAGE_RAM_LOCATION_SEPARATOR '.'
65#endif
66
72#ifndef CONFIG_SUIT_STORAGE_RAM_LOCATION_PREFIX
73#define CONFIG_SUIT_STORAGE_RAM_LOCATION_PREFIX ".ram."
74#endif
75
83
96
97#ifdef __cplusplus
98}
99#endif
100
#define CONFIG_SUIT_STORAGE_RAM_REGIONS
Number of allocated regions.
Definition ram.h:50
#define CONFIG_SUIT_STORAGE_RAM_ATTR
Extra attributes for allocating the RAM struct.
Definition ram.h:57
#define CONFIG_SUIT_STORAGE_RAM_SIZE
Size of each memory region.
Definition ram.h:43
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:107
suit_storage_ram_region_t regions[CONFIG_SUIT_STORAGE_RAM_REGIONS]
ram storage regions
Definition ram.h:92
uint32_t sequence_no
Ephemeral sequence number.
Definition ram.h:94
suit_storage_t storage
parent struct
Definition ram.h:88
size_t active_region
Active region to write to.
Definition ram.h:93
Single in-memory storage region.
Definition ram.h:79
size_t occupied
Region space filled.
Definition ram.h:80
uint8_t mem[CONFIG_SUIT_STORAGE_RAM_SIZE]
RAM area.
Definition ram.h:81