Lines Matching full:device

23 #include <device.h>
68 const struct device *bus;
79 * @param node_id Devicetree node identifier for the I2C device whose
164 typedef int (*i2c_api_configure_t)(const struct device *dev,
166 typedef int (*i2c_api_full_io_t)(const struct device *dev,
170 typedef int (*i2c_api_slave_register_t)(const struct device *dev,
172 typedef int (*i2c_api_slave_unregister_t)(const struct device *dev,
174 typedef int (*i2c_api_recover_bus_t)(const struct device *dev);
184 typedef int (*i2c_slave_api_register_t)(const struct device *dev);
185 typedef int (*i2c_slave_api_unregister_t)(const struct device *dev);
196 /** Slave device responds to 10-bit addressing. */
199 /** @brief Function called when a write to the device is initiated.
203 * with a particular device.
210 * device to which the operation is addressed.
217 /** @brief Function called when a write to the device is continued.
221 * device.
228 * device to which the operation is addressed.
238 /** @brief Function called when a read from the device is initiated.
242 * with a particular device.
250 * device to which the operation is addressed.
260 /** @brief Function called when a read from the device is continued.
264 * associated with the device device.
272 * device to which the operation is addressed.
283 * start condition addressed to a particular device.
287 * associated with the device device. After the function returns the
292 * device to which the operation is addressed.
312 /** @brief Structure describing a device that supports the I2C
317 * of a slave device, respective.
320 * implements the device behavior prior to passing the object
327 /** Flags for the slave device defined by I2C_SLAVE_FLAGS_* constants */
330 /** Address for this slave device */
340 * @param dev Pointer to the device structure for the driver instance.
341 * @param dev_config Bit-packed 32-bit value to the device runtime configuration
345 * @retval -EIO General input / output error, failed to configure device.
347 __syscall int i2c_configure(const struct device *dev, uint32_t dev_config);
349 static inline int z_impl_i2c_configure(const struct device *dev, in z_impl_i2c_configure()
359 * @brief Perform data transfer to another I2C device in master mode.
362 * to another I2C device synchronously. Use i2c_read()/i2c_write()
376 * @param dev Pointer to the device structure for an I2C controller
380 * @param addr Address of the I2C target device.
385 __syscall int i2c_transfer(const struct device *dev,
389 static inline int z_impl_i2c_transfer(const struct device *dev, in z_impl_i2c_transfer()
400 * @brief Perform data transfer to another I2C device in master mode.
423 * @param dev Pointer to the device structure for an I2C controller
430 __syscall int i2c_recover_bus(const struct device *dev);
432 static inline int z_impl_i2c_recover_bus(const struct device *dev) in z_impl_i2c_recover_bus()
445 * @brief Registers the provided config as Slave device of a controller.
452 * onto I2C slave device driver via a set of callback functions provided in
458 * @param dev Pointer to the device structure for an I2C controller
468 static inline int i2c_slave_register(const struct device *dev, in i2c_slave_register()
482 * @brief Unregisters the provided config as Slave device
488 * @param dev Pointer to the device structure for an I2C controller
497 static inline int i2c_slave_unregister(const struct device *dev, in i2c_slave_unregister()
511 * @brief Instructs the I2C Slave device to register itself to the I2C Controller
513 * This routine instructs the I2C Slave device to register itself to the I2C
516 * @param dev Pointer to the device structure for the I2C slave
517 * device (not itself an I2C controller).
523 __syscall int i2c_slave_driver_register(const struct device *dev);
525 static inline int z_impl_i2c_slave_driver_register(const struct device *dev) in z_impl_i2c_slave_driver_register()
534 * @brief Instructs the I2C Slave device to unregister itself from the I2C
537 * This routine instructs the I2C Slave device to unregister itself from the I2C
540 * @param dev Pointer to the device structure for the I2C slave
541 * device (not itself an I2C controller).
546 __syscall int i2c_slave_driver_unregister(const struct device *dev);
548 static inline int z_impl_i2c_slave_driver_unregister(const struct device *dev) in z_impl_i2c_slave_driver_unregister()
561 * @brief Write a set amount of data to an I2C device.
565 * @param dev Pointer to the device structure for an I2C controller
569 * @param addr Address to the target I2C device for writing.
574 static inline int i2c_write(const struct device *dev, const uint8_t *buf, in i2c_write()
587 * @brief Write a set amount of data to an I2C device.
606 * @brief Read a set amount of data from an I2C device.
610 * @param dev Pointer to the device structure for an I2C controller
614 * @param addr Address of the I2C device being read.
619 static inline int i2c_read(const struct device *dev, uint8_t *buf, in i2c_read()
632 * @brief Read a set amount of data from an I2C device.
651 * @brief Write then read data from an I2C device.
657 * @param dev Pointer to the device structure for an I2C controller
659 * @param addr Address of the I2C device
668 static inline int i2c_write_read(const struct device *dev, uint16_t addr, in i2c_write_read()
686 * @brief Write then read data from an I2C device.
712 * @brief Read multiple bytes from an internal address of an I2C device.
715 * I2C device synchronously.
719 * @param dev Pointer to the device structure for an I2C controller
721 * @param dev_addr Address of the I2C device for reading.
729 static inline int i2c_burst_read(const struct device *dev, in i2c_burst_read()
741 * @brief Read multiple bytes from an internal address of an I2C device.
764 * @brief Write multiple bytes to an internal address of an I2C device.
767 * I2C device synchronously.
774 * @param dev Pointer to the device structure for an I2C controller
776 * @param dev_addr Address of the I2C device for writing.
784 static inline int i2c_burst_write(const struct device *dev, in i2c_burst_write()
804 * @brief Write multiple bytes to an internal address of an I2C device.
827 * @brief Read internal register of an I2C device.
830 * device synchronously.
832 * @param dev Pointer to the device structure for an I2C controller
834 * @param dev_addr Address of the I2C device for reading.
841 static inline int i2c_reg_read_byte(const struct device *dev, in i2c_reg_read_byte()
851 * @brief Read internal register of an I2C device.
870 * @brief Write internal register of an I2C device.
873 * device synchronously.
878 * @param dev Pointer to the device structure for an I2C controller
880 * @param dev_addr Address of the I2C device for writing.
887 static inline int i2c_reg_write_byte(const struct device *dev, in i2c_reg_write_byte()
897 * @brief Write internal register of an I2C device.
916 * @brief Update internal register of an I2C device.
919 * register of an I2C device synchronously.
924 * @param dev Pointer to the device structure for an I2C controller
926 * @param dev_addr Address of the I2C device for updating.
934 static inline int i2c_reg_update_byte(const struct device *dev, in i2c_reg_update_byte()
956 * @brief Update internal register of an I2C device.
997 * @param addr Address of the I2C target device.