![]() |
Zephyr API 4.4.99
A Scalable Open Source RTOS
|
#include <zephyr/drivers/i2c.h>Go to the source code of this file.
Functions | |
| int | mfd_ds3231_i2c_get_registers (const struct device *dev, uint8_t start_reg, uint8_t *buf, const size_t buf_size) |
| Get specified number of registers from an I2C device starting at the given register address. | |
| int | mfd_ds3231_i2c_set_registers (const struct device *dev, uint8_t start_reg, const uint8_t *buf, const size_t buf_size) |
| Set a register on an I2C device at the given register address. | |
| int mfd_ds3231_i2c_get_registers | ( | const struct device * | dev, |
| uint8_t | start_reg, | ||
| uint8_t * | buf, | ||
| const size_t | buf_size ) |
Get specified number of registers from an I2C device starting at the given register address.
| dev | ds3231 mfd device |
| start_reg | The register address to start at. |
| buf | The buffer array pointer to store results in. |
| buf_size | The amount of register values to return. |
| 0 | on success |
| -errno | in case of any bus error |
| int mfd_ds3231_i2c_set_registers | ( | const struct device * | dev, |
| uint8_t | start_reg, | ||
| const uint8_t * | buf, | ||
| const size_t | buf_size ) |
Set a register on an I2C device at the given register address.
| dev | ds3231 mfd device |
| start_reg | The register address to set. |
| buf | The value to write to the given address. |
| buf_size | The size of the buffer to be written to the given address. |
| 0 | on success |
| -errno | in case of any bus error |