blob: f01839d32523b8bc7513f10b8c92168c5e83e211 (
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
28
29
30
31
32
33
34
35
36
37
38
39
|
/* 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);
/**
* Enable/Disable interact with the TCPC
*
* This is used for pretending no TCPC connected on the port.
* Interaction is default enabled.
*
* @param emul - NX20P383X emulator data
* @param val - value for interrupt register
*/
void nx20p348x_emul_set_tcpc_interact(const struct emul *emul, bool en);
#endif
|