Bridle API 4.1.99
A Zephyr based application framework
Loading...
Searching...
No Matches
sc18is604_emul.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 TiaC Systems
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef ZEPHYR_DRIVERS_MFD_SC18IS604_EMUL_H_
7#define ZEPHYR_DRIVERS_MFD_SC18IS604_EMUL_H_
8
9#include <stdint.h>
10#include <stddef.h>
11#include <zephyr/drivers/emul.h>
12
13#define SC18IS604_BUFFER_SIZE 255
14
20
31int mfd_sc18is604_emul_i2c_set_rx(const struct emul *target, uint8_t *buf, size_t len);
32
42int mfd_sc18is604_emul_i2c_get_last_tx(const struct emul *target,
43 struct mfd_sc18is604_emul_transmission *transmission);
44
55int mfd_sc18is604_emul_gpio_set_input(const struct emul *target, uint8_t pin, uint8_t value);
56
67int mfd_sc18is604_emul_gpio_get_output(const struct emul *target, uint8_t pin, uint8_t *value);
68
69#endif /* ZEPHYR_DRIVERS_MFD_SC18IS604_EMUL_H_ */
int mfd_sc18is604_emul_gpio_get_output(const struct emul *target, uint8_t pin, uint8_t *value)
Get the value of a GPIO output pin.
Definition mfd_sc18is604_emul.c:88
int mfd_sc18is604_emul_gpio_set_input(const struct emul *target, uint8_t pin, uint8_t value)
Simulate a GPIO input pin being set to a specific value.
Definition mfd_sc18is604_emul.c:62
int mfd_sc18is604_emul_i2c_set_rx(const struct emul *target, uint8_t *buf, size_t len)
Simulate the device receiving a message.
Definition mfd_sc18is604_emul.c:39
#define SC18IS604_BUFFER_SIZE
Definition sc18is604_emul.h:13
int mfd_sc18is604_emul_i2c_get_last_tx(const struct emul *target, struct mfd_sc18is604_emul_transmission *transmission)
Get the last transmission sent by the device.
Definition mfd_sc18is604_emul.c:54
Definition sc18is604_emul.h:15
size_t len
Definition sc18is604_emul.h:18
uint8_t addr
Definition sc18is604_emul.h:16
uint8_t msg[255]
Definition sc18is604_emul.h:17