/* * Copyright (c) 2022 Thomas Stranger * * SPDX-License-Identifier: Apache-2.0 */ #include #include static inline int z_vrfy_w1_reset_bus(const struct device *dev) { Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, reset_bus)); return z_impl_w1_reset_bus((const struct device *)dev); } #include static inline int z_vrfy_w1_read_bit(const struct device *dev) { Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, read_bit)); return z_impl_w1_read_bit((const struct device *)dev); } #include static inline int z_vrfy_w1_write_bit(const struct device *dev, bool bit) { Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, write_bit)); return z_impl_w1_write_bit((const struct device *)dev, bit); } #include static inline int z_vrfy_w1_read_byte(const struct device *dev) { Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, read_byte)); return z_impl_w1_read_byte((const struct device *)dev); } #include static inline int z_vrfy_w1_write_byte(const struct device *dev, uint8_t byte) { Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, write_byte)); return z_impl_w1_write_byte((const struct device *)dev, (uint8_t)byte); } #include static inline int z_vrfy_w1_read_block(const struct device *dev, uint8_t *buffer, size_t len) { Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_W1)); Z_OOPS(Z_SYSCALL_MEMORY_WRITE(buffer, len)); return z_impl_w1_read_block((const struct device *)dev, (uint8_t *)buffer, (size_t)len); } #include static inline int z_vrfy_w1_write_block(const struct device *dev, const uint8_t *buffer, size_t len) { Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_W1)); Z_OOPS(Z_SYSCALL_MEMORY_READ(buffer, len)); return z_impl_w1_write_block((const struct device *)dev, (const uint8_t *)buffer, (size_t)len); } #include static inline int z_vrfy_w1_change_bus_lock(const struct device *dev, bool lock) { Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_W1)); return z_impl_w1_change_bus_lock((const struct device *)dev, lock); } #include static inline int z_vrfy_w1_configure(const struct device *dev, enum w1_settings_type type, uint32_t value) { Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, configure)); return z_impl_w1_configure(dev, type, value); } #include static inline size_t z_vrfy_w1_get_slave_count(const struct device *dev) { Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_W1)); return z_impl_w1_get_slave_count((const struct device *)dev); } #include