|
Bridle API 4.2.0
A Zephyr based application framework
|
MFD Interface for an SC18IM604 bridge. More...
#include <stddef.h>#include <stdint.h>#include <zephyr/device.h>#include <zephyr/kernel.h>#include <zephyr/drivers/gpio.h>Go to the source code of this file.
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.
| #define SC18IS604_CMD_POWER_DOWN 0x30 |
| #define SC18IS604_CMD_POWER_DOWN_KEY1 0x5A |
| #define SC18IS604_CMD_POWER_DOWN_KEY2 0xA5 |
| #define SC18IS604_CMD_READ_AFTER_WRITE_I2C 0x02 |
| #define SC18IS604_CMD_READ_BUFFER 0x06 |
| #define SC18IS604_CMD_READ_I2C 0x01 |
| #define SC18IS604_CMD_READ_REGISTER 0x21 |
| #define SC18IS604_CMD_SPI_CONFIG 0x18 |
| #define SC18IS604_CMD_VERSION_STRING 0xFE |
| #define SC18IS604_CMD_WRITE_AFTER_WRITE_I2C 0x03 |
| #define SC18IS604_CMD_WRITE_I2C 0x00 |
| #define SC18IS604_CMD_WRITE_REGISTER 0x20 |
| #define SC18IS604_I2C_CLOCK_375KHZ 5 |
| #define SC18IS604_I2C_CLOCK_99KHZ 19 |
| #define SC18IS604_I2C_STATUS_BUSY 0xF3 |
| #define SC18IS604_I2C_STATUS_BYTE_NACK 0xF2 |
| #define SC18IS604_I2C_STATUS_DEVICE_ADDR_NACK 0xF1 |
| #define SC18IS604_I2C_STATUS_SUCCESS 0xF0 |
| #define SC18IS604_IO_CONFIG_INPUT 0b00 |
| #define SC18IS604_IO_CONFIG_OPEN_DRAIN 0b11 |
| #define SC18IS604_IO_CONFIG_PUSH_PULL 0b10 |
| #define SC18IS604_IO_NUM_PINS_INOUT 4 |
| #define SC18IS604_IO_NUM_PINS_IONLY 1 |
| #define SC18IS604_IO_NUM_PINS_MAX |
| #define SC18IS604_REG_I2C_ADDRESS 0x05 |
| #define SC18IS604_REG_I2C_CLOCK 0x02 |
| #define SC18IS604_REG_I2C_STATUS 0x04 |
| #define SC18IS604_REG_I2C_TIMEOUT 0x03 |
| #define SC18IS604_REG_IO_CONFIG 0x00 |
| #define SC18IS604_REG_IO_STATE 0x01 |
| #define SC18IS604_VERSION_STRING_SIZE 16 |