Bridle API 4.1.99
A Zephyr based application framework
|
I2C controller part of an SC18IM604 bridge. More...
Data Structures | |
struct | i2c_sc18is604_config |
SC18IM604 I2C controller configuration data. More... | |
struct | i2c_sc18is604_xfr_cb_work |
Data structure for tracking a asynchronous I2C transfer. More... | |
Macros | |
#define | I2C_SC18IS604_DEFINE(inst) |
Functions | |
int | await_signal (struct k_poll_signal *signal, int *result, k_timeout_t timeout) |
Await a signal being raised. | |
static void | i2c_sc18is604_interrupt_work_fn_initial (struct k_work *work) |
static void | i2c_sc18is604_interrupt_work_fn_final (struct k_work *work) |
static void | i2c_sc18is604_interrupt_callback (const struct device *dev, struct gpio_callback *cb, gpio_port_pins_t pins) |
static int | i2c_sc18is604_set_clock_speed (const struct device *dev, uint32_t speed) |
static int | i2c_sc18is604_write_message (const struct device *dev, uint8_t *data, size_t len, uint16_t addr) |
static int | i2c_sc18is604_read_message (const struct device *dev, uint8_t *data, size_t len, uint16_t addr) |
static int | i2c_sc18is604_configure (const struct device *dev, uint32_t config) |
static int | i2c_sc18is604_get_config (const struct device *dev, uint32_t *config) |
static int | i2c_sc18is604_transfer_msg (const struct device *dev, struct i2c_msg *msg, uint16_t addr) |
static int | i2c_sc18is604_transfer (const struct device *dev, struct i2c_msg *msgs, uint8_t num_msgs, uint16_t addr) |
static int | i2c_sc18is604_init (const struct device *dev) |
DT_INST_FOREACH_STATUS_OKAY (I2C_SC18IS604_DEFINE) | |
Variables | |
static const struct i2c_driver_api | i2c_sc18is604_api |
int | i2c_sc18is604_transfer_cb (const struct device *dev, struct i2c_msg *msgs, uint8_t num_msgs, uint16_t addr, i2c_callback_t cb, void *userdata) |
Transfer I2C messages asynchronously. | |
I2C controller part of an SC18IM604 bridge.
The I2C controller part based on the MFD interface to the SC18IM604 SPI to I2C and GPIO controller bridge.
#define I2C_SC18IS604_DEFINE | ( | inst | ) |
#include <drivers/i2c/i2c_sc18is604.c>
int await_signal | ( | struct k_poll_signal * | signal, |
int * | result, | ||
k_timeout_t | timeout | ||
) |
#include <drivers/i2c/i2c_sc18is604.c>
Await a signal being raised.
signal | The signal to await. | |
[out] | result | The result attached to the raised signal. |
timeout | Timeout before awaiting the signal is aborted. |
1 | If the signal was raised. |
0 | If the signal was not raised within the timeout. |
DT_INST_FOREACH_STATUS_OKAY | ( | I2C_SC18IS604_DEFINE | ) |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
inlinestatic |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
int i2c_sc18is604_transfer_cb | ( | const struct device * | dev, |
struct i2c_msg * | msgs, | ||
uint8_t | num_msgs, | ||
uint16_t | addr, | ||
i2c_callback_t | cb, | ||
void * | userdata | ||
) |
#include <drivers/i2c/i2c_sc18is604.h>
Transfer I2C messages asynchronously.
dev | An SC18IS604 I2C controller. |
msgs | I2C messages to be transmitted. Pointer must remain valid for the duration of the transfer. |
num_msgs | Number of messages to be transmitted. |
addr | I2C address of the target device. |
cb | Callback to be invoked on transfer completion (or failure). |
userdata | User data passed to callback. |
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>
|
static |
#include <drivers/i2c/i2c_sc18is604.c>