Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pulse_io_driver_api Struct Reference

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.

Detailed Description

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.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ channel_configure

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.

◆ channel_get

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.

◆ channel_release

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.

◆ get_capabilities

int(* pulse_io_driver_api::get_capabilities) (const struct device *dev, struct pulse_io_caps *caps)

OPT Query backend capabilities.

◆ get_decoder

int(* pulse_io_driver_api::get_decoder) (const struct device *dev, const struct pulse_io_decoder_api **api)

OPT Fetch the backend decoder vtable.

◆ get_encoder

int(* pulse_io_driver_api::get_encoder) (const struct device *dev, const struct pulse_io_encoder_api **api)

OPT Fetch the backend encoder vtable.

◆ receive_sync

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.

◆ stop

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.

◆ submit

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().

◆ transmit_sync

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.


The documentation for this struct was generated from the following file: