summaryrefslogtreecommitdiff
path: root/zephyr/include/emul/emul_nx20p348x.h
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/include/emul/emul_nx20p348x.h')
-rw-r--r--zephyr/include/emul/emul_nx20p348x.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/zephyr/include/emul/emul_nx20p348x.h b/zephyr/include/emul/emul_nx20p348x.h
new file mode 100644
index 0000000000..a8435ee530
--- /dev/null
+++ b/zephyr/include/emul/emul_nx20p348x.h
@@ -0,0 +1,27 @@
+/* Copyright 2023 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef EMUL_NX20P348X_H
+#define EMUL_NX20P348X_H
+
+#include <zephyr/drivers/emul.h>
+
+/**
+ * Peek an internal register value
+ *
+ * @param emul - NX20P383X emulator data
+ * @param reg - which register to peek
+ * @return register contents
+ */
+uint8_t nx20p348x_emul_peek(const struct emul *emul, int reg);
+
+/**
+ * Set an interrupt in the first interrupt register
+ *
+ * @param emul - NX20P383X emulator data
+ * @param val - value for interrupt register
+ */
+void nx20p348x_emul_set_interrupt1(const struct emul *emul, uint8_t val);
+#endif