Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
w1_driver_api Struct Reference

Driver Operations 1-Wire driver operations More...

#include <zephyr/drivers/w1.h>

Data Fields

w1_reset_bus_t reset_bus
  REQ Reset the 1-Wire bus to prepare slaves for communication.
w1_read_bit_t read_bit
  REQ Read a single bit from the 1-Wire bus.
w1_write_bit_t write_bit
  REQ Write a single bit to the 1-Wire bus.
w1_read_byte_t read_byte
  REQ Read a single byte from the 1-Wire bus.
w1_write_byte_t write_byte
  REQ Write a single byte to the 1-Wire bus.
w1_read_block_t read_block
  OPT Read a block of data from the 1-Wire bus.
w1_write_block_t write_block
  OPT Write a block of data to the 1-Wire bus.
w1_configure_t configure
  REQ Configure parameters of the 1-Wire master.
w1_change_bus_lock_t change_bus_lock
  OPT Lock or unlock bus access.

Detailed Description

Driver Operations 1-Wire driver operations

This is the driver API structure any 1-Wire 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

◆ change_bus_lock

w1_change_bus_lock_t w1_driver_api::change_bus_lock

OPT Lock or unlock bus access.

If not implemented, the subsystem falls back to a mutex-based lock.

◆ configure

w1_configure_t w1_driver_api::configure

REQ Configure parameters of the 1-Wire master.

◆ read_bit

w1_read_bit_t w1_driver_api::read_bit

REQ Read a single bit from the 1-Wire bus.

◆ read_block

w1_read_block_t w1_driver_api::read_block

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

If not implemented, the subsystem falls back to repeated w1_driver_api::read_byte calls.

◆ read_byte

w1_read_byte_t w1_driver_api::read_byte

REQ Read a single byte from the 1-Wire bus.

◆ reset_bus

w1_reset_bus_t w1_driver_api::reset_bus

REQ Reset the 1-Wire bus to prepare slaves for communication.

◆ write_bit

w1_write_bit_t w1_driver_api::write_bit

REQ Write a single bit to the 1-Wire bus.

◆ write_block

w1_write_block_t w1_driver_api::write_block

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

If not implemented, the subsystem falls back to repeated w1_driver_api::write_byte calls.

◆ write_byte

w1_write_byte_t w1_driver_api::write_byte

REQ Write a single byte to the 1-Wire bus.


The documentation for this struct was generated from the following file:
  • zephyr/drivers/w1.h