|
Bridle API 4.3.99
A Zephyr based application framework
|
MFD interface for an SC18IM604 bridge. More...
Macros | |
| #define | READ_SC18IS604_REG(dev, reg, val) |
| #define | WRITE_SC18IS604_REG(dev, reg, val) |
Functions | |
| int | mfd_sc18is604_transfer (const struct device *dev, uint8_t *cmd, size_t cmd_len, uint8_t *tx_data, size_t tx_len, uint8_t *rx_data, size_t rx_len) |
| Perform a data transfer to and from an SC18IS604 device. | |
| int | mfd_sc18is604_read_register (const struct device *dev, uint8_t reg, uint8_t *val) |
| Write to an internal register. | |
| int | mfd_sc18is604_write_register (const struct device *dev, uint8_t reg, uint8_t val) |
| Read from an internal register. | |
| int | mfd_sc18is604_read_buffer (const struct device *dev, uint8_t *data, size_t len) |
| Read data from the internal buffer of an SC18IS604. | |
| int | mfd_sc18is604_add_callback (const struct device *dev, struct gpio_callback *callback) |
| Register an interrupt callback. | |
| int | mfd_sc18is604_remove_callback (const struct device *dev, struct gpio_callback *callback) |
| Remove a previously registered interrupt callback. | |
| int | mfd_sc18is604_claim (const struct device *dev, k_timeout_t timeout) |
| Claim a lock on an SC18IS604 device, preventing other users from accessing the device until the lock is released. | |
| void | mfd_sc18is604_release (const struct device *dev) |
| Release a previously acquired lock on an SC18IS604 device. | |
MFD interface for an SC18IM604 bridge.
The MFD interface for an SC18IM604 SPI to I2C and GPIO controller bridge.
| #define READ_SC18IS604_REG | ( | dev, | |
| reg, | |||
| val ) |
#include <sc18is604.h>
| #define WRITE_SC18IS604_REG | ( | dev, | |
| reg, | |||
| val ) |
#include <sc18is604.h>
| int mfd_sc18is604_add_callback | ( | const struct device * | dev, |
| struct gpio_callback * | callback ) |
#include <sc18is604.h>
Register an interrupt callback.
| dev | An SC18IS604 device |
| callback | The callback to add. |
| 0 | On success. |
| int mfd_sc18is604_claim | ( | const struct device * | dev, |
| k_timeout_t | timeout ) |
#include <sc18is604.h>
Claim a lock on an SC18IS604 device, preventing other users from accessing the device until the lock is released.
| dev | The SC18IS604 MFD device to be locked. |
| timeout | Timeout after which trying to claim the device is aborted. |
| int mfd_sc18is604_read_buffer | ( | const struct device * | dev, |
| uint8_t * | data, | ||
| size_t | len ) |
#include <sc18is604.h>
Read data from the internal buffer of an SC18IS604.
| dev | An SC18IS604 MFD device. | |
| [out] | data | Data read from the buffer. |
| len | Number of bytes to read from the buffer. |
| int mfd_sc18is604_read_register | ( | const struct device * | dev, |
| uint8_t | reg, | ||
| uint8_t * | val ) |
#include <sc18is604.h>
Write to an internal register.
| dev | An SC18IS604 MFD device. |
| reg | Register address to write to. |
| value | Value to write into the register. |
| void mfd_sc18is604_release | ( | const struct device * | dev | ) |
#include <sc18is604.h>
Release a previously acquired lock on an SC18IS604 device.
| dev | The SC18IS604 MFD device to be unlocked. |
| int mfd_sc18is604_remove_callback | ( | const struct device * | dev, |
| struct gpio_callback * | callback ) |
#include <sc18is604.h>
Remove a previously registered interrupt callback.
| dev | An SC18IS604 device |
| callback | The callback to remove. |
| 0 | On success. |
| int mfd_sc18is604_transfer | ( | const struct device * | dev, |
| uint8_t * | cmd, | ||
| size_t | cmd_len, | ||
| uint8_t * | tx_data, | ||
| size_t | tx_len, | ||
| uint8_t * | rx_data, | ||
| size_t | rx_len ) |
#include <sc18is604.h>
Perform a data transfer to and from an SC18IS604 device.
| dev | An SC18IS604 MFD device. | |
| cmd | A command sequence sent before the TX data. Can be NULL, in which case no command sequence is sent). | |
| cmd_len | Length of the command sequence. | |
| tx_data | Data to be sent to the device. Can be NULL, in which case no data is send). | |
| tx_len | Length of the TX data buffer. | |
| [out] | rx_data | Buffer to hold data received from the device. Can be NULL, in which case no data is received. |
| rx_len | Length of the RX data buffer. |
| 0 | On success. |
| int mfd_sc18is604_write_register | ( | const struct device * | dev, |
| uint8_t | reg, | ||
| uint8_t | val ) |
#include <sc18is604.h>
Read from an internal register.
| dev | An SC18IS604 MFD device. | |
| reg | Register address to read from. | |
| [out] | value | Value read from the register. |