7#ifndef ZEPHYR_INCLUDE_DRIVERS_CAN_TRANSCEIVER_H_
8#define ZEPHYR_INCLUDE_DRIVERS_CAN_TRANSCEIVER_H_
33typedef int (*can_transceiver_enable_t)(
const struct device *dev);
39typedef int (*can_transceiver_disable_t)(
const struct device *dev);
41__subsystem
struct can_transceiver_driver_api {
42 can_transceiver_enable_t enable;
43 can_transceiver_disable_t disable;
64 const struct can_transceiver_driver_api *api =
65 (
const struct can_transceiver_driver_api *)dev->
api;
67 return api->enable(dev);
86 const struct can_transceiver_driver_api *api =
87 (
const struct can_transceiver_driver_api *)dev->
api;
89 return api->disable(dev);
static int can_transceiver_enable(const struct device *dev)
Enable CAN transceiver.
Definition: transceiver.h:62
static int can_transceiver_disable(const struct device *dev)
Disable CAN transceiver.
Definition: transceiver.h:84
Runtime device structure (in ROM) per driver instance.
Definition: device.h:381
const void * api
Address of the API structure exposed by the device instance.
Definition: device.h:387