summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h')
-rw-r--r--zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h b/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
new file mode 100644
index 0000000000..8d54e9a335
--- /dev/null
+++ b/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
@@ -0,0 +1,24 @@
+/* Copyright 2022 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <stdint.h>
+
+#include "emul/emul_common_i2c.h"
+
+/**
+ * @brief Emulator state struct
+ *
+ */
+struct basic_i2c_device_data {
+ struct i2c_common_emul_data common;
+ uint8_t regs[256];
+};
+
+/**
+ * @brief Resets the internal register store to default
+ *
+ * @param emul Pointer to the emulator object
+ */
+void basic_i2c_device_reset(const struct emul *emul);