|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
Driver Operations Pulse IO driver operations More...
#include <zephyr/drivers/pulse_io.h>
Data Fields | |
| int(* | get_capabilities )(const struct device *dev, struct pulse_io_caps *caps) |
| OPT Query backend capabilities. | |
| int(* | channel_get )(const struct device *dev, uint8_t channel_idx, struct pulse_io_channel **chan) |
| REQ Reserve a channel for exclusive use. | |
| int(* | channel_release )(const struct device *dev, struct pulse_io_channel *chan) |
| REQ Release a channel previously obtained via pulse_io_channel_get. | |
| int(* | channel_configure )(const struct device *dev, struct pulse_io_channel *chan, const struct pulse_io_config *cfg) |
| REQ Configure a reserved channel. | |
| int(* | transmit_sync )(const struct device *dev, struct pulse_io_channel *chan, const struct pulse_io_tx_req *req, k_timeout_t timeout) |
| REQ Blocking transmit. | |
| int(* | receive_sync )(const struct device *dev, struct pulse_io_channel *chan, const struct pulse_io_rx_req *req, size_t *count, k_timeout_t timeout) |
| REQ Blocking receive. | |
| int(* | stop )(const struct device *dev, struct pulse_io_channel *chan) |
| REQ Stop any in-flight transmit or receive on the channel. | |
| void(* | submit )(const struct device *dev, struct rtio_iodev_sqe *iodev_sqe) |
| OPT Submit an RTIO request, see pulse_io_iodev_submit(). | |
| int(* | get_encoder )(const struct device *dev, const struct pulse_io_encoder_api **api) |
| OPT Fetch the backend encoder vtable. | |
| int(* | get_decoder )(const struct device *dev, const struct pulse_io_decoder_api **api) |
| OPT Fetch the backend decoder vtable. | |
Driver Operations Pulse IO driver operations
This is the driver API structure any Pulse IO driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.
Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.
| int(* pulse_io_driver_api::channel_configure) (const struct device *dev, struct pulse_io_channel *chan, const struct pulse_io_config *cfg) |
REQ Configure a reserved channel.
| int(* pulse_io_driver_api::channel_get) (const struct device *dev, uint8_t channel_idx, struct pulse_io_channel **chan) |
REQ Reserve a channel for exclusive use.
| int(* pulse_io_driver_api::channel_release) (const struct device *dev, struct pulse_io_channel *chan) |
REQ Release a channel previously obtained via pulse_io_channel_get.
| int(* pulse_io_driver_api::get_capabilities) (const struct device *dev, struct pulse_io_caps *caps) |
OPT Query backend capabilities.
| int(* pulse_io_driver_api::get_decoder) (const struct device *dev, const struct pulse_io_decoder_api **api) |
OPT Fetch the backend decoder vtable.
| int(* pulse_io_driver_api::get_encoder) (const struct device *dev, const struct pulse_io_encoder_api **api) |
OPT Fetch the backend encoder vtable.
| int(* pulse_io_driver_api::receive_sync) (const struct device *dev, struct pulse_io_channel *chan, const struct pulse_io_rx_req *req, size_t *count, k_timeout_t timeout) |
REQ Blocking receive.
| int(* pulse_io_driver_api::stop) (const struct device *dev, struct pulse_io_channel *chan) |
REQ Stop any in-flight transmit or receive on the channel.
| void(* pulse_io_driver_api::submit) (const struct device *dev, struct rtio_iodev_sqe *iodev_sqe) |
OPT Submit an RTIO request, see pulse_io_iodev_submit().
| int(* pulse_io_driver_api::transmit_sync) (const struct device *dev, struct pulse_io_channel *chan, const struct pulse_io_tx_req *req, k_timeout_t timeout) |
REQ Blocking transmit.