Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
1-Wire Driver Backend API

Data Structures

struct  w1_controller_config
 Configuration common to all 1-Wire controller implementations. More...
struct  w1_controller_data
 Data common to all 1-Wire controller implementations. More...
struct  w1_driver_api
  Driver Operations 1-Wire driver operations More...

Macros

#define w1_master_config   w1_controller_config __DEPRECATED_MACRO
 Configuration common to all 1-Wire controller implementations.
#define w1_master_data   w1_controller_data __DEPRECATED_MACRO
 Data common to all 1-Wire controller implementations.

Typedefs

typedef int(* w1_reset_bus_t) (const struct device *dev)
 Reset the 1-Wire bus to prepare peripherals for communication.
typedef int(* w1_read_bit_t) (const struct device *dev)
 Read a single bit from the 1-Wire bus.
typedef int(* w1_write_bit_t) (const struct device *dev, bool bit)
 Write a single bit to the 1-Wire bus.
typedef int(* w1_read_byte_t) (const struct device *dev)
 Read a single byte from the 1-Wire bus.
typedef int(* w1_write_byte_t) (const struct device *dev, const uint8_t byte)
 Write a single byte to the 1-Wire bus.
typedef int(* w1_read_block_t) (const struct device *dev, uint8_t *buffer, size_t len)
 Read a block of data from the 1-Wire bus.
typedef int(* w1_write_block_t) (const struct device *dev, const uint8_t *buffer, size_t len)
 Write a block of data to the 1-Wire bus.
typedef size_t(* w1_get_peripheral_count_t) (const struct device *dev)
 Get the number of peripherals on the bus.
typedef w1_get_peripheral_count_t w1_get_slave_count_t
 Get the number of peripherals on the bus.
typedef int(* w1_configure_t) (const struct device *dev, enum w1_settings_type type, uint32_t value)
 Configure parameters of the 1-Wire controller.
typedef int(* w1_change_bus_lock_t) (const struct device *dev, bool lock)
 Lock or unlock the 1-Wire bus.

Detailed Description

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

Macro Definition Documentation

◆ w1_master_config

#define w1_master_config   w1_controller_config __DEPRECATED_MACRO

#include <zephyr/drivers/w1.h>

Configuration common to all 1-Wire controller implementations.

Deprecated
Use struct w1_controller_config instead.

◆ w1_master_data

#define w1_master_data   w1_controller_data __DEPRECATED_MACRO

#include <zephyr/drivers/w1.h>

Data common to all 1-Wire controller implementations.

Deprecated
Use struct w1_controller_data instead.

Typedef Documentation

◆ w1_change_bus_lock_t

typedef int(* w1_change_bus_lock_t) (const struct device *dev, bool lock)

#include <zephyr/drivers/w1.h>

Lock or unlock the 1-Wire bus.

See w1_lock_bus() and w1_unlock_bus() for details.

◆ w1_configure_t

typedef int(* w1_configure_t) (const struct device *dev, enum w1_settings_type type, uint32_t value)

#include <zephyr/drivers/w1.h>

Configure parameters of the 1-Wire controller.

See w1_configure() for argument description.

◆ w1_get_peripheral_count_t

typedef size_t(* w1_get_peripheral_count_t) (const struct device *dev)

#include <zephyr/drivers/w1.h>

Get the number of peripherals on the bus.

See w1_get_peripheral_count() for argument description.

◆ w1_get_slave_count_t

#include <zephyr/drivers/w1.h>

Get the number of peripherals on the bus.

Deprecated
Use w1_get_peripheral_count_t instead.

◆ w1_read_bit_t

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

#include <zephyr/drivers/w1.h>

Read a single bit from the 1-Wire bus.

See w1_read_bit() for argument description.

◆ w1_read_block_t

typedef int(* w1_read_block_t) (const struct device *dev, uint8_t *buffer, size_t len)

#include <zephyr/drivers/w1.h>

Read a block of data from the 1-Wire bus.

See w1_read_block() for argument description.

◆ w1_read_byte_t

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

#include <zephyr/drivers/w1.h>

Read a single byte from the 1-Wire bus.

See w1_read_byte() for argument description.

◆ w1_reset_bus_t

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

#include <zephyr/drivers/w1.h>

Reset the 1-Wire bus to prepare peripherals for communication.

See w1_reset_bus() for argument description.

◆ w1_write_bit_t

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

#include <zephyr/drivers/w1.h>

Write a single bit to the 1-Wire bus.

See w1_write_bit() for argument description.

◆ w1_write_block_t

typedef int(* w1_write_block_t) (const struct device *dev, const uint8_t *buffer, size_t len)

#include <zephyr/drivers/w1.h>

Write a block of data to the 1-Wire bus.

See w1_write_block() for argument description.

◆ w1_write_byte_t

typedef int(* w1_write_byte_t) (const struct device *dev, const uint8_t byte)

#include <zephyr/drivers/w1.h>

Write a single byte to the 1-Wire bus.

See w1_write_byte() for argument description.