|
Zephyr API Documentation 4.4.0-rc1
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. | |
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. | |
Interfaces for 1-Wire devices.
| enum w1_settings_type |
#include <zephyr/drivers/w1.h>
Defines the 1-Wire master settings types, which are runtime configurable.
|
inlinestatic |
#include <zephyr/drivers/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. |
| 0 | If successful. |
| -errno | Negative error code on error. |
|
inlinestatic |
#include <zephyr/drivers/w1.h>
Unlock the 1-wire bus.
This routine unlocks the bus to permit access to bus line.
| [in] | dev | Pointer to the device structure for the driver instance. |
| 0 | If successful. |
| -errno | Negative error code on error. |