|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Interfaces for 1-Wire devices. More...
Topics | |
| 1-Wire Sensor API | |
| 1-Wire Sensor API | |
| 1-Wire data link layer | |
| 1-Wire data link layer | |
| 1-Wire network layer | |
| 1-Wire network layer | |
Files | |
| file | w1.h |
| Main header file for 1-Wire driver API. | |
Data Structures | |
| struct | w1_master_config |
| @def_driverbackendgroup{1-Wire,w1_interface} More... | |
| struct | w1_master_data |
| Data common to all 1-Wire master implementations. More... | |
| struct | w1_driver_api |
| @driver_ops{1-Wire} More... | |
Enumerations | |
| enum | w1_settings_type { W1_SETTING_SPEED , W1_SETTING_STRONG_PULLUP , W1_SETINGS_TYPE_COUNT } |
| Defines the 1-Wire master settings types, which are runtime configurable. More... | |
Functions | |
| static int | w1_lock_bus (const struct device *dev) |
| Lock the 1-wire bus to prevent simultaneous access. | |
| static int | w1_unlock_bus (const struct device *dev) |
| Unlock the 1-wire bus. | |
| 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. | |
Interfaces for 1-Wire devices.
| typedef int(* w1_configure_t) (const struct device *dev, enum w1_settings_type type, uint32_t value) |
#include <w1.h>
Configure parameters of the 1-Wire master.
See w1_configure() for argument description.
| typedef size_t(* w1_get_slave_count_t) (const struct device *dev) |
#include <w1.h>
Get the number of slaves on the bus.
See w1_get_slave_count() for argument description.
| typedef int(* w1_read_bit_t) (const struct device *dev) |
#include <w1.h>
Read a block of data from the 1-Wire bus.
See w1_read_block() for argument description.
| typedef int(* w1_read_byte_t) (const struct device *dev) |
#include <w1.h>
Read a single byte from the 1-Wire bus.
See w1_read_byte() for argument description.
| typedef int(* w1_reset_bus_t) (const struct device *dev) |
#include <w1.h>
Reset the 1-Wire bus to prepare slaves for communication.
See w1_reset_bus() for argument description.
#include <w1.h>
Write a block of data to the 1-Wire bus.
See w1_write_block() for argument description.
#include <w1.h>
Write a single byte to the 1-Wire bus.
See w1_write_byte() for argument description.
| enum w1_settings_type |
#include <w1.h>
Defines the 1-Wire master settings types, which are runtime configurable.
|
inlinestatic |
#include <w1.h>
Lock the 1-wire bus to prevent simultaneous access.
This routine locks the bus to prevent simultaneous access from different threads. The calling thread waits until the bus becomes available. A thread is permitted to lock a mutex it has already locked.
| [in] | dev | Pointer to the device structure for the driver instance. |