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