treewide: Move device_tree to commonlib
[coreboot2.git] / util / smmstoretool / data.h
blob58e6c7d7a67514c3bfebebc3972b06c609c1daa9
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #ifndef SMMSTORETOOL__DATA_H__
4 #define SMMSTORETOOL__DATA_H__
6 #include <stdbool.h>
7 #include <stddef.h>
8 #include <stdint.h>
10 enum data_type {
11 DATA_TYPE_BOOL,
12 DATA_TYPE_UINT8,
13 DATA_TYPE_UINT16,
14 DATA_TYPE_UINT32,
15 DATA_TYPE_UINT64,
16 DATA_TYPE_ASCII,
17 DATA_TYPE_UNICODE,
18 DATA_TYPE_RAW,
21 void print_data(const uint8_t data[], size_t data_size, enum data_type type);
23 void *make_data(const char source[], size_t *data_size, enum data_type type);
25 bool parse_data_type(const char str[], enum data_type *type);
27 #endif // SMMSTORETOOL__DATA_H__