blob: 58e6c7d7a67514c3bfebebc3972b06c609c1daa9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef SMMSTORETOOL__DATA_H__
#define SMMSTORETOOL__DATA_H__
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
enum data_type {
DATA_TYPE_BOOL,
DATA_TYPE_UINT8,
DATA_TYPE_UINT16,
DATA_TYPE_UINT32,
DATA_TYPE_UINT64,
DATA_TYPE_ASCII,
DATA_TYPE_UNICODE,
DATA_TYPE_RAW,
};
void print_data(const uint8_t data[], size_t data_size, enum data_type type);
void *make_data(const char source[], size_t *data_size, enum data_type type);
bool parse_data_type(const char str[], enum data_type *type);
#endif // SMMSTORETOOL__DATA_H__
|