Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tle9104.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 SILA Embedded Solutions GmbH
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_TLE9104_H_
7#define ZEPHYR_INCLUDE_DRIVERS_MFD_TLE9104_H_
8
9#include <stdbool.h>
10#include <zephyr/device.h>
11
12#define TLE9104_GPIO_COUNT 4
13
15 /* overtemperature */
17 /* overcurrent timeout */
19 /* overtemperature during overcurrent */
21 /* short to battery */
23 /* no failure */
25 /* no diagnosis done */
27};
28
30 /* short to ground */
32 /* open load */
34 /* no failure */
36 /* no diagnosis done */
38};
39
44
53int tle9104_get_diagnostics(const struct device *dev,
62int tle9104_clear_diagnostics(const struct device *dev);
71int tle9104_write_state(const struct device *dev, uint8_t state);
72
73#endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_TLE9104_H_ */
int tle9104_clear_diagnostics(const struct device *dev)
clear the diagnostics of the outputs
#define TLE9104_GPIO_COUNT
Definition tle9104.h:12
int tle9104_get_diagnostics(const struct device *dev, struct gpio_tle9104_channel_diagnostics diag[4])
get the diagnostics of the outputs
int tle9104_write_state(const struct device *dev, uint8_t state)
write output state
tle9104_on_state_diagnostics
Definition tle9104.h:14
@ TLE9104_ONDIAG_OT
Definition tle9104.h:16
@ TLE9104_ONDIAG_OCTIME
Definition tle9104.h:18
@ TLE9104_ONDIAG_NOFAIL
Definition tle9104.h:24
@ TLE9104_ONDIAG_OCOT
Definition tle9104.h:20
@ TLE9104_ONDIAG_SCB
Definition tle9104.h:22
@ TLE9104_ONDIAG_UNKNOWN
Definition tle9104.h:26
tle9104_off_state_diagnostics
Definition tle9104.h:29
@ TLE9104_OFFDIAG_NOFAIL
Definition tle9104.h:35
@ TLE9104_OFFDIAG_SCG
Definition tle9104.h:31
@ TLE9104_OFFDIAG_OL
Definition tle9104.h:33
@ TLE9104_OFFDIAG_UNKNOWN
Definition tle9104.h:37
state
Definition parser_state.h:29
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:412
Definition tle9104.h:40
enum tle9104_on_state_diagnostics on
Definition tle9104.h:41
enum tle9104_off_state_diagnostics off
Definition tle9104.h:42