From 6d0ce31b0ae5df97d4a340c54b66d95598b336a4 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sat, 13 Jul 2024 12:27:04 +0200 Subject: Add ram type skeleton --- src/blocks/info.h | 2 ++ src/blocks/ram.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/blocks/ram.c (limited to 'src/blocks') diff --git a/src/blocks/info.h b/src/blocks/info.h index c5ea38e..2b42c72 100644 --- a/src/blocks/info.h +++ b/src/blocks/info.h @@ -7,4 +7,6 @@ extern const config_block_t block_text_info; extern const config_block_t block_group_info; +extern const config_block_t block_ram_info; + #endif diff --git a/src/blocks/ram.c b/src/blocks/ram.c new file mode 100644 index 0000000..2190b20 --- /dev/null +++ b/src/blocks/ram.c @@ -0,0 +1,22 @@ +#include "info.h" + +static bool block_ram_apply(block_t *block, void *result) +{ + return true; +} + +static const config_entry_t block_ram_entries[] = { + { "text", CONFIG_STRING, offsetof(block_t, text.text) }, + { "text-color", CONFIG_COLOR, offsetof(block_t, text.text_color) }, + { "text-size", CONFIG_INT, offsetof(block_t, text.text_size) }, + { 0 }, +}; + +const config_block_t block_ram_info = { + .type_name = "ram", + .type_size = 0, + .base = { 0 }, + .entries = block_ram_entries, + .apply = block_ram_apply, +}; + -- cgit v1.2.3