RTEMS: i2c_bus Struct Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Data Fields
i2c_bus Struct Reference
Device Drivers » Inter-Integrated Circuit (I2C) Driver » I2C Bus Driver

I2C bus control. More...

`#include <i2c.h>`

## Data Fields
int(* | transfer )(i2c_bus *bus, i2c_msg *msgs, uint32_t msg_count)
| Transfers I2C messages.
int(* | set_clock )(i2c_bus *bus, unsigned long clock)
| Sets the bus clock.
void(* | destroy )(i2c_bus *bus)
| Destroys the bus.
rtems_recursive_mutex | mutex
| Mutex to protect the bus access.
uint16_t | default_address
| Default slave device address.
bool | ten_bit_address
| Use 10-bit addresses.
bool | use_pec
| Use SMBus PEC.
unsigned long | retries
| Transfer retry count.
rtems_interval | timeout
| Transaction timeout in ticks.
unsigned long | functionality
| Controller functionality.

## Detailed Description

I2C bus control.

## Field Documentation

## ◆ destroy

void(* i2c_bus::destroy) (i2c_bus *bus)

Destroys the bus.

Parameters

  [in] | bus | The bus control.

## ◆ set_clock

int(* i2c_bus::set_clock) (i2c_bus *bus, unsigned long clock)

Sets the bus clock.

Parameters

  [in] | bus | The bus control.
  [in] | clock | The desired bus clock in Hz.

Return values

  0 | Successful operation.
  negative | Negative error number in case of an error.

## ◆ transfer

int(* i2c_bus::transfer) (i2c_bus *bus, i2c_msg *msgs, uint32_t msg_count)

Transfers I2C messages.

Parameters

  [in] | bus | The bus control.
  [in] | msgs | The messages to transfer.
  [in] | msg_count | The count of messages to transfer. It must be positive.

Return values

  0 | Successful operation.
  negative | Negative error number in case of an error.

The documentation for this struct was generated from the following file:

- cpukit/include/dev/i2c/i2c.h