summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
blob: c235d64825dc8c9d2c42eafbf274328cbb176cd9 (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
/* 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 "emul/emul_common_i2c.h"

#include <stdint.h>

#define BASIC_I2C_DEV_EXT_ACCESS_REG 0xFF

/**
 * @brief Emulator state struct
 *
 */
struct basic_i2c_device_data {
	struct i2c_common_emul_data common;
	uint8_t regs[256];
	uint8_t extended_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);