|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
IT8300 emulator. More...
Files | |
| file | gpio_ite_it8300_emul.h |
| Public API for the ITE IT8300 GPIO emulator. | |
Functions | |
| void | it8300_emul_reset (const struct emul *target) |
| Reset all emulated IT8300 registers. | |
| int | it8300_emul_set_reg (const struct emul *target, uint8_t reg, uint8_t value) |
| Set an emulated IT8300 register. | |
| int | it8300_emul_get_reg (const struct emul *target, uint8_t reg, uint8_t *value) |
| Read an emulated IT8300 register. | |
| int | it8300_emul_set_input (const struct emul *target, uint8_t group, uint8_t value) |
| Set the sampled input value for one GPIO group. | |
IT8300 emulator.
#include <zephyr/drivers/gpio/gpio_ite_it8300_emul.h>
Read an emulated IT8300 register.
| 0 | on success |
| -EINVAL | if reg is outside the emulated register map |
| void it8300_emul_reset | ( | const struct emul * | target | ) |
#include <zephyr/drivers/gpio/gpio_ite_it8300_emul.h>
Reset all emulated IT8300 registers.
#include <zephyr/drivers/gpio/gpio_ite_it8300_emul.h>
Set the sampled input value for one GPIO group.
Changed bits are latched in the group's interrupt status register. If alert generation is enabled, the emulated ALERT# GPIO is asserted.
| target | Emulator instance. |
| group | GPIO group index: 0 for A through 4 for E. |
| value | New sampled input value. |
| 0 | on success |
| -EINVAL | if group is invalid |
#include <zephyr/drivers/gpio/gpio_ite_it8300_emul.h>
Set an emulated IT8300 register.
This is primarily used to inject values into read-only hardware state, such as a GPIO pin data mirror register.
| 0 | on success |
| -EINVAL | if reg is outside the emulated register map |