Zephyr API
4.5.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
transceiver.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Vestas Wind Systems A/S
3
* Copyright (c) 2025 Renesas Electronics Corporation
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_LIN_TRANSCEIVER_H
9
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_LIN_TRANSCEIVER_H
10
11
#ifdef __cplusplus
12
extern
"C"
{
13
#endif
14
22
23
#include <
zephyr/drivers/lin.h
>
24
#include <
zephyr/device.h
>
25
34
40
45
typedef
int (*lin_transceiver_enable_t)(
const
struct
device
*dev,
uint8_t
flags
);
46
51
typedef
int (*lin_transceiver_disable_t)(
const
struct
device
*dev);
52
56
__subsystem
struct
lin_transceiver_driver_api {
58
lin_transceiver_enable_t enable;
60
lin_transceiver_disable_t disable;
61
};
62
64
81
static
inline
int
lin_transceiver_enable
(
const
struct
device
*dev,
uint8_t
flags
)
82
{
83
return
DEVICE_API_GET
(lin_transceiver, dev)->enable(dev,
flags
);
84
}
85
101
static
inline
int
lin_transceiver_disable
(
const
struct
device
*dev)
102
{
103
return
DEVICE_API_GET
(lin_transceiver, dev)->disable(dev);
104
}
105
109
110
#ifdef __cplusplus
111
}
112
#endif
113
114
#endif
/* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_LIN_TRANSCEIVER_H */
device.h
APIs and macros for the Zephyr device model.
DEVICE_API_GET
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition
device.h:1501
lin_transceiver_disable
static int lin_transceiver_disable(const struct device *dev)
Disable LIN transceiver.
Definition
transceiver.h:101
lin_transceiver_enable
static int lin_transceiver_enable(const struct device *dev, uint8_t flags)
Enable LIN transceiver.
Definition
transceiver.h:81
lin.h
LIN (Local Interconnect Network) driver API.
flags
flags
Definition
parser.h:86
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:543
zephyr
drivers
lin
transceiver.h
Generated on
for Zephyr API by
1.17.0