|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Interfaces for device multiplexers. More...
Files | |
| file | devmux.h |
| Public APIs for the Device Multiplexer driver. | |
Functions | |
| int | devmux_select_get (const struct device *dev) |
| Get the current selection of a devmux device. | |
| int | devmux_select_set (struct device *dev, size_t index) |
| Set the selection of a devmux device. | |
Interfaces for device multiplexers.
Devmux operates as a device multiplexer, forwarding the characteristics of the selected device.
| int devmux_select_get | ( | const struct device * | dev | ) |
#include <zephyr/drivers/misc/devmux/devmux.h>
Get the current selection of a devmux device.
Return the index of the currently selected device.
| dev | the devmux device |
| -EINVAL | If dev is invalid |
#include <zephyr/drivers/misc/devmux/devmux.h>
Set the selection of a devmux device.
Select the device at index.
| [in] | dev | the devmux device |
| index | the index representing the desired selection |
| 0 | On success |
| -EINVAL | If dev is invalid |
| -ENODEV | If the multiplexed device at index is not ready |