Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
pca9422.h
Go to the documentation of this file.
1
/*
2
* Copyright 2025 NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_PCA9422_H_
8
#define ZEPHYR_INCLUDE_DRIVERS_MFD_PCA9422_H_
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
19
20
#include <stddef.h>
21
#include <
stdint.h
>
22
23
#include <
zephyr/device.h
>
24
25
typedef
void (*
child_isr_t
)(
const
struct
device
*dev);
26
30
enum
child_dev
{
31
PCA9422_DEV_REG
= 0,
32
PCA9422_DEV_CHG
,
33
PCA9422_DEV_FG
,
34
PCA9422_DEV_MAX
,
35
};
36
45
void
mfd_pca9422_set_irqhandler
(
const
struct
device
*dev,
const
struct
device
*
child_dev
,
46
enum
child_dev
child_idx,
child_isr_t
handler);
47
57
int
mfd_pca9422_reg_burst_read
(
const
struct
device
*dev,
uint8_t
reg,
uint8_t
*value,
size_t
len);
58
67
int
mfd_pca9422_reg_read_byte
(
const
struct
device
*dev,
uint8_t
reg,
uint8_t
*value);
68
78
int
mfd_pca9422_reg_burst_write
(
const
struct
device
*dev,
uint8_t
reg,
uint8_t
*value,
size_t
len);
79
88
int
mfd_pca9422_reg_write_byte
(
const
struct
device
*dev,
uint8_t
reg,
uint8_t
value);
89
99
int
mfd_pca9422_reg_update_byte
(
const
struct
device
*dev,
uint8_t
reg,
uint8_t
mask,
uint8_t
value);
100
102
103
#ifdef __cplusplus
104
}
105
#endif
106
107
#endif
/* ZEPHYR_INCLUDE_DRIVERS_MFD_PCA9422_H_ */
device.h
mfd_pca9422_reg_write_byte
int mfd_pca9422_reg_write_byte(const struct device *dev, uint8_t reg, uint8_t value)
Write single register to pca9422.
mfd_pca9422_reg_read_byte
int mfd_pca9422_reg_read_byte(const struct device *dev, uint8_t reg, uint8_t *value)
Read single register from pca9422.
mfd_pca9422_reg_update_byte
int mfd_pca9422_reg_update_byte(const struct device *dev, uint8_t reg, uint8_t mask, uint8_t value)
Update selected bits in pca9422 register.
mfd_pca9422_reg_burst_read
int mfd_pca9422_reg_burst_read(const struct device *dev, uint8_t reg, uint8_t *value, size_t len)
Read multiple registers from pca9422.
mfd_pca9422_reg_burst_write
int mfd_pca9422_reg_burst_write(const struct device *dev, uint8_t reg, uint8_t *value, size_t len)
Write multiple registers to pca9422.
mfd_pca9422_set_irqhandler
void mfd_pca9422_set_irqhandler(const struct device *dev, const struct device *child_dev, enum child_dev child_idx, child_isr_t handler)
Set child interrupt handler of pca9422.
PCA9422_DEV_MAX
@ PCA9422_DEV_MAX
Fuelgauge.
Definition
pca9422.h:34
PCA9422_DEV_CHG
@ PCA9422_DEV_CHG
Regulator.
Definition
pca9422.h:32
PCA9422_DEV_REG
@ PCA9422_DEV_REG
Definition
pca9422.h:31
PCA9422_DEV_FG
@ PCA9422_DEV_FG
Charger.
Definition
pca9422.h:33
child_dev
child_dev
Child device of adp5360.
Definition
adp5360.h:26
child_isr_t
void(* child_isr_t)(const struct device *dev)
Definition
nxp_lp_flexcomm.h:11
stdint.h
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:513
zephyr
drivers
mfd
pca9422.h
Generated on
for Zephyr API by
1.17.0