Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
IT8300 emulator

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.

Detailed Description

IT8300 emulator.

Function Documentation

◆ it8300_emul_get_reg()

int it8300_emul_get_reg ( const struct emul * target,
uint8_t reg,
uint8_t * value )

#include <zephyr/drivers/gpio/gpio_ite_it8300_emul.h>

Read an emulated IT8300 register.

Return values
0on success
-EINVALif reg is outside the emulated register map

◆ it8300_emul_reset()

void it8300_emul_reset ( const struct emul * target)

#include <zephyr/drivers/gpio/gpio_ite_it8300_emul.h>

Reset all emulated IT8300 registers.

◆ it8300_emul_set_input()

int it8300_emul_set_input ( const struct emul * target,
uint8_t group,
uint8_t value )

#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.

Parameters
targetEmulator instance.
groupGPIO group index: 0 for A through 4 for E.
valueNew sampled input value.
Return values
0on success
-EINVALif group is invalid

◆ it8300_emul_set_reg()

int it8300_emul_set_reg ( const struct emul * target,
uint8_t reg,
uint8_t value )

#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.

Return values
0on success
-EINVALif reg is outside the emulated register map