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

Data Structures

struct  w1_master_config
 Configuration common to all 1-Wire master implementations. More...
struct  w1_master_data
 Data common to all 1-Wire master implementations. More...
struct  w1_driver_api
  Driver Operations 1-Wire driver operations More...

Typedefs

typedef int(* w1_reset_bus_t) (const struct device *dev)
 Reset the 1-Wire bus to prepare slaves 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_slave_count_t) (const struct device *dev)
 Get the number of slaves 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 master.
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.

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 master.

See w1_configure() for argument description.

◆ w1_get_slave_count_t

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

#include <zephyr/drivers/w1.h>

Get the number of slaves on the bus.

See w1_get_slave_count() for argument description.

◆ 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 slaves 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.