coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pca9538.h File Reference
#include <types.h>
#include <device/device.h>
Include dependency graph for pca9538.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define INPUT_REG   0x00
 
#define OUTPUT_REG   0x01
 
#define INPUT_INVERT_REG   0x02
 
#define IO_CONFIG_REG   0x03
 

Functions

uint8_t pca9538_read_input (void)
 
void pca9538_set_output (uint8_t val)
 
struct devicepca9538_get_dev (void)
 

Macro Definition Documentation

◆ INPUT_INVERT_REG

#define INPUT_INVERT_REG   0x02

Definition at line 12 of file pca9538.h.

◆ INPUT_REG

#define INPUT_REG   0x00

Definition at line 10 of file pca9538.h.

◆ IO_CONFIG_REG

#define IO_CONFIG_REG   0x03

Definition at line 13 of file pca9538.h.

◆ OUTPUT_REG

#define OUTPUT_REG   0x01

Definition at line 11 of file pca9538.h.

Function Documentation

◆ pca9538_get_dev()

struct device* pca9538_get_dev ( void  )

Referenced by pca9538_read_input(), and pca9538_set_output().

Here is the caller graph for this function:

◆ pca9538_read_input()

uint8_t pca9538_read_input ( void  )

Definition at line 9 of file pca9538.c.

References i2c_dev_readb_at(), INPUT_REG, and pca9538_get_dev().

Here is the call graph for this function:

◆ pca9538_set_output()

void pca9538_set_output ( uint8_t  val)

Definition at line 20 of file pca9538.c.

References i2c_dev_writeb_at(), OUTPUT_REG, pca9538_get_dev(), and val.

Here is the call graph for this function: