From b3072e146b4edd4a2422cee758aa341b0638491d Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Mon, 1 Mar 2021 14:41:35 +0200 Subject: now able to work with 8-bit data! Signed-off-by: Gediminas Jakutis --- meson_options.txt | 2 +- src/defs.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index ab26488..52d535b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,6 @@ option('data-signed', description : 'Switch whether to use signed data type') option('data-bitness', type : 'combo', - choices : ['64', '32', '16'], + choices : ['64', '32', '16', '8'], value : '64', description : 'Size of a data entry to use, in bits') diff --git a/src/defs.h b/src/defs.h index faaecd8..5d632c3 100644 --- a/src/defs.h +++ b/src/defs.h @@ -23,7 +23,13 @@ goto l;\ }} while (0); -#if entry_field_size == 16 +#if entry_field_size == 8 +# ifdef entry_field_signed + typedef int8_t field; +# else + typedef uint8_t field; +# endif +#elif entry_field_size == 16 # ifdef entry_field_signed typedef int16_t field; # else -- cgit v1.2.3