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

Data Structures

struct  smbus_driver_api
  Driver Operations SMBus driver operations More...

Typedefs

typedef int(* smbus_api_configure_t) (const struct device *dev, uint32_t dev_config)
 Configure operation of an SMBus host controller.
typedef int(* smbus_api_get_config_t) (const struct device *dev, uint32_t *dev_config)
 Get configuration of an SMBus host controller.
typedef int(* smbus_api_quick_t) (const struct device *dev, uint16_t addr, enum smbus_direction)
 Perform an SMBus Quick operation.
typedef int(* smbus_api_byte_write_t) (const struct device *dev, uint16_t addr, uint8_t byte)
 Perform an SMBus Byte Write operation.
typedef int(* smbus_api_byte_read_t) (const struct device *dev, uint16_t addr, uint8_t *byte)
 Perform an SMBus Byte Read operation.
typedef int(* smbus_api_byte_data_write_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t byte)
 Perform an SMBus Byte Data Write operation.
typedef int(* smbus_api_byte_data_read_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t *byte)
 Perform an SMBus Byte Data Read operation.
typedef int(* smbus_api_word_data_write_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint16_t word)
 Perform an SMBus Word Data Write operation.
typedef int(* smbus_api_word_data_read_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint16_t *word)
 Perform an SMBus Word Data Read operation.
typedef int(* smbus_api_pcall_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint16_t send_word, uint16_t *recv_word)
 Perform an SMBus Process Call operation.
typedef int(* smbus_api_block_write_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t count, uint8_t *buf)
 Perform an SMBus Block Write operation.
typedef int(* smbus_api_block_read_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t *count, uint8_t *buf)
 Perform an SMBus Block Read operation.
typedef int(* smbus_api_block_pcall_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t send_count, uint8_t *send_buf, uint8_t *recv_count, uint8_t *recv_buf)
 Perform an SMBus Block Process Call operation.
typedef int(* smbus_api_smbalert_cb_t) (const struct device *dev, struct smbus_callback *cb)
 Add or remove an SMBALERT callback.
typedef int(* smbus_api_host_notify_cb_t) (const struct device *dev, struct smbus_callback *cb)
 Add or remove a Host Notify callback.

Detailed Description

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

Typedef Documentation

◆ smbus_api_block_pcall_t

typedef int(* smbus_api_block_pcall_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t send_count, uint8_t *send_buf, uint8_t *recv_count, uint8_t *recv_buf)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Block Process Call operation.

See smbus_block_pcall() for argument description.

◆ smbus_api_block_read_t

typedef int(* smbus_api_block_read_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t *count, uint8_t *buf)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Block Read operation.

See smbus_block_read() for argument description.

◆ smbus_api_block_write_t

typedef int(* smbus_api_block_write_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t count, uint8_t *buf)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Block Write operation.

See smbus_block_write() for argument description.

◆ smbus_api_byte_data_read_t

typedef int(* smbus_api_byte_data_read_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t *byte)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Byte Data Read operation.

See smbus_byte_data_read() for argument description.

◆ smbus_api_byte_data_write_t

typedef int(* smbus_api_byte_data_write_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint8_t byte)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Byte Data Write operation.

See smbus_byte_data_write() for argument description.

◆ smbus_api_byte_read_t

typedef int(* smbus_api_byte_read_t) (const struct device *dev, uint16_t addr, uint8_t *byte)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Byte Read operation.

See smbus_byte_read() for argument description.

◆ smbus_api_byte_write_t

typedef int(* smbus_api_byte_write_t) (const struct device *dev, uint16_t addr, uint8_t byte)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Byte Write operation.

See smbus_byte_write() for argument description.

◆ smbus_api_configure_t

typedef int(* smbus_api_configure_t) (const struct device *dev, uint32_t dev_config)

#include <zephyr/drivers/smbus.h>

Configure operation of an SMBus host controller.

See smbus_configure() for argument description.

◆ smbus_api_get_config_t

typedef int(* smbus_api_get_config_t) (const struct device *dev, uint32_t *dev_config)

#include <zephyr/drivers/smbus.h>

Get configuration of an SMBus host controller.

See smbus_get_config() for argument description.

◆ smbus_api_host_notify_cb_t

typedef int(* smbus_api_host_notify_cb_t) (const struct device *dev, struct smbus_callback *cb)

#include <zephyr/drivers/smbus.h>

Add or remove a Host Notify callback.

See smbus_host_notify_set_cb() and smbus_host_notify_remove_cb() for argument description.

◆ smbus_api_pcall_t

typedef int(* smbus_api_pcall_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint16_t send_word, uint16_t *recv_word)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Process Call operation.

See smbus_pcall() for argument description.

◆ smbus_api_quick_t

typedef int(* smbus_api_quick_t) (const struct device *dev, uint16_t addr, enum smbus_direction)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Quick operation.

See smbus_quick() for argument description.

◆ smbus_api_smbalert_cb_t

typedef int(* smbus_api_smbalert_cb_t) (const struct device *dev, struct smbus_callback *cb)

#include <zephyr/drivers/smbus.h>

Add or remove an SMBALERT callback.

See smbus_smbalert_set_cb() and smbus_smbalert_remove_cb() for argument description.

◆ smbus_api_word_data_read_t

typedef int(* smbus_api_word_data_read_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint16_t *word)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Word Data Read operation.

See smbus_word_data_read() for argument description.

◆ smbus_api_word_data_write_t

typedef int(* smbus_api_word_data_write_t) (const struct device *dev, uint16_t addr, uint8_t cmd, uint16_t word)

#include <zephyr/drivers/smbus.h>

Perform an SMBus Word Data Write operation.

See smbus_word_data_write() for argument description.