Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
VIRTIO Driver Backend API

Data Structures

struct  virtio_driver_api
  Driver Operations VIRTIO driver operations More...

Typedefs

typedef struct virtq *(* virtio_api_get_virtqueue) (const struct device *dev, uint16_t queue_idx)
 Type definition of VIRTIO API function for getting a virtqueue.
typedef void(* virtio_api_notify_virtqueue) (const struct device *dev, uint16_t queue_idx)
 Type definition of VIRTIO API function for notifying a virtqueue.
typedef void *(* virtio_api_get_device_specific_config) (const struct device *dev)
 Type definition of VIRTIO API function for getting the device specific config.
typedef bool(* virtio_api_read_device_feature_bit) (const struct device *dev, int bit)
 Type definition of VIRTIO API function for reading a device feature bit.
typedef int(* virtio_api_write_driver_feature_bit) (const struct device *dev, int bit, bool value)
 Type definition of VIRTIO API function for writing a driver feature bit.
typedef int(* virtio_api_commit_feature_bits) (const struct device *dev)
 Type definition of VIRTIO API function for committing the feature bits.
typedef int(* virtio_api_init_virtqueues) (const struct device *dev, uint16_t num_queues, virtio_enumerate_queues cb, void *opaque)
 Type definition of VIRTIO API function for initializing the virtqueues.
typedef void(* virtio_api_finalize_init) (const struct device *dev)
 Type definition of VIRTIO API function for finalizing the initialization.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a VIRTIO driver.

Typedef Documentation

◆ virtio_api_commit_feature_bits

typedef int(* virtio_api_commit_feature_bits) (const struct device *dev)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for committing the feature bits.

See virtio_commit_feature_bits() for argument descriptions.

◆ virtio_api_finalize_init

typedef void(* virtio_api_finalize_init) (const struct device *dev)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for finalizing the initialization.

See virtio_finalize_init() for argument descriptions.

◆ virtio_api_get_device_specific_config

typedef void *(* virtio_api_get_device_specific_config) (const struct device *dev)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for getting the device specific config.

See virtio_get_device_specific_config() for argument descriptions.

◆ virtio_api_get_virtqueue

typedef struct virtq *(* virtio_api_get_virtqueue) (const struct device *dev, uint16_t queue_idx)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for getting a virtqueue.

See virtio_get_virtqueue() for argument descriptions.

◆ virtio_api_init_virtqueues

typedef int(* virtio_api_init_virtqueues) (const struct device *dev, uint16_t num_queues, virtio_enumerate_queues cb, void *opaque)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for initializing the virtqueues.

See virtio_init_virtqueues() for argument descriptions.

◆ virtio_api_notify_virtqueue

typedef void(* virtio_api_notify_virtqueue) (const struct device *dev, uint16_t queue_idx)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for notifying a virtqueue.

See virtio_notify_virtqueue() for argument descriptions.

◆ virtio_api_read_device_feature_bit

typedef bool(* virtio_api_read_device_feature_bit) (const struct device *dev, int bit)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for reading a device feature bit.

See virtio_read_device_feature_bit() for argument descriptions.

◆ virtio_api_write_driver_feature_bit

typedef int(* virtio_api_write_driver_feature_bit) (const struct device *dev, int bit, bool value)

#include <zephyr/drivers/virtio.h>

Type definition of VIRTIO API function for writing a driver feature bit.

See virtio_write_driver_feature_bit() for argument descriptions.