#include <stdint.h>
#include <stddef.h>
#include <zephyr/drivers/emul.h>
Go to the source code of this file.
◆ SC18IS604_BUFFER_SIZE
#define SC18IS604_BUFFER_SIZE 255 |
◆ mfd_sc18is604_emul_gpio_get_output()
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.
- Parameters
-
| target | The emulated device to get the pin value from. |
| pin | The pin to get the value of. |
[out] | value | The value of the pin. |
- Returns
- 0 On success.
-
A negative error code on failure.
◆ mfd_sc18is604_emul_gpio_set_input()
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.
- Parameters
-
target | The emulated device to set the pin on. |
pin | The pin to set. |
value | The value to set the pin to. |
- Returns
- 0 On success.
-
A negative error code on failure.
◆ mfd_sc18is604_emul_i2c_get_last_tx()
Get the last transmission sent by the device.
- Parameters
-
| target | The amulated device to get the last transmission from. |
[out] | transmission | The transmission to fill with the last transmission. |
- Return values
-
- Returns
- A negative error code on failure.
◆ mfd_sc18is604_emul_i2c_set_rx()
int mfd_sc18is604_emul_i2c_set_rx |
( |
const struct emul * |
target, |
|
|
uint8_t * |
buf, |
|
|
size_t |
len |
|
) |
| |
Simulate the device receiving a message.
The message will be moved to the RX buffer the next time a read is performed.
- Parameters
-
target | The emulated device to receive the message. |
buf | The message to receive. |
len | The length of the message. |
- Returns
- The number of bytes received, or a negative error code on failure.