coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pca9538.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef _I2C_PCA9538_H_
4
#define _I2C_PCA9538_H_
5
6
#include <types.h>
7
#include <
device/device.h
>
8
9
/* Register layout */
10
#define INPUT_REG 0x00
11
#define OUTPUT_REG 0x01
12
#define INPUT_INVERT_REG 0x02
13
#define IO_CONFIG_REG 0x03
14
15
/* Provide some functions to read input and write output values. */
16
uint8_t
pca9538_read_input
(
void
);
17
void
pca9538_set_output
(
uint8_t
val
);
18
/*
19
* Provide a way to get the right device structure for the I/O expander.
20
* The user of this driver has to provide this function if read/write of I/O
21
* values on the I/O expander is needed.
22
*/
23
struct
device
*
pca9538_get_dev
(
void
);
24
25
#endif
/* _I2C_PCA9538_H_ */
device.h
pca9538_read_input
uint8_t pca9538_read_input(void)
Definition:
pca9538.c:9
pca9538_set_output
void pca9538_set_output(uint8_t val)
Definition:
pca9538.c:20
pca9538_get_dev
struct device * pca9538_get_dev(void)
uint8_t
unsigned char uint8_t
Definition:
stdint.h:8
device
Definition:
device.h:107
val
u8 val
Definition:
sys.c:300
src
drivers
i2c
pca9538
pca9538.h
Generated by
1.9.1