summaryrefslogtreecommitdiff
path: root/util/smmstoretool/data.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/smmstoretool/data.h')
-rw-r--r--util/smmstoretool/data.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/util/smmstoretool/data.h b/util/smmstoretool/data.h
new file mode 100644
index 0000000000..13bd7bc4f4
--- /dev/null
+++ b/util/smmstoretool/data.h
@@ -0,0 +1,26 @@
+/* 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_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__