RTEMS  5.1
Data Fields

I2C bus control. More...

#include <i2c.h>

Data Fields

int(* transfer )(i2c_bus *bus, i2c_msg *msgs, uint32_t msg_count)
 Transfers I2C messages. More...
 
int(* set_clock )(i2c_bus *bus, unsigned long clock)
 Sets the bus clock. More...
 
void(* destroy )(i2c_bus *bus)
 Destroys the bus. More...
 
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]busThe bus control.

◆ set_clock

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

Sets the bus clock.

Parameters
[in]busThe bus control.
[in]clockThe desired bus clock in Hz.
Return values
0Successful operation.
negativeNegative 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]busThe bus control.
[in]msgsThe messages to transfer.
[in]msg_countThe count of messages to transfer. It must be positive.
Return values
0Successful operation.
negativeNegative error number in case of an error.

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