Synergy Software Package User's Manual

#include <r_i2c_api.h>

Data Fields

ssp_err_t(* open )(i2c_ctrl_t *const p_ctrl, i2c_cfg_t const *const p_cfg)
 
ssp_err_t(* close )(i2c_ctrl_t *const p_ctrl)
 
ssp_err_t(* masterWriteSlaveRead )(i2c_ctrl_t *const p_ctrl, uint8_t *const p_dest, uint32_t const bytes)
 
ssp_err_t(* masterReadSlaveWrite )(i2c_ctrl_t *const p_ctrl, uint8_t *const p_src, uint32_t const bytes)
 
ssp_err_t(* versionGet )(ssp_version_t *const p_version)
 

Detailed Description

Interface definition for I2C access as slave

Field Documentation

◆ close

ssp_err_t(* i2c_api_slave_t::close) (i2c_ctrl_t *const p_ctrl)

Closes the driver and releases the I2C device.

Implemented as
Parameters
[in]p_ctrlPointer to control block set in i2c_api_slave_t::open call.

◆ masterReadSlaveWrite

ssp_err_t(* i2c_api_slave_t::masterReadSlaveWrite) (i2c_ctrl_t *const p_ctrl, uint8_t *const p_src, uint32_t const bytes)

Performs a write operation on an I2C device.

Implemented as
Parameters
[in]p_ctrlPointer to control block set in i2c_api_slave_t::open call.
[in]p_srcPointer to the location to get write data from.
[in]bytesNumber of bytes to write.

◆ masterWriteSlaveRead

ssp_err_t(* i2c_api_slave_t::masterWriteSlaveRead) (i2c_ctrl_t *const p_ctrl, uint8_t *const p_dest, uint32_t const bytes)

Performs a read operation on an I2C device.

Implemented as
Parameters
[in]p_ctrlPointer to control block set in i2c_api_slave_t::open call.
[in]p_destPointer to the location to store read data.
[in]bytesNumber of bytes to read.

◆ open

ssp_err_t(* i2c_api_slave_t::open) (i2c_ctrl_t *const p_ctrl, i2c_cfg_t const *const p_cfg)

Opens the I2C driver and initializes the hardware.

Implemented as
Parameters
[in]p_ctrlPointer to control block. Must be declared by user. Elements are set here.
[in]p_cfgPointer to configuration structure.

◆ versionGet

ssp_err_t(* i2c_api_slave_t::versionGet) (ssp_version_t *const p_version)

Gets version information and stores it in the provided version struct.

Implemented as
Parameters
[out]p_versionCode and API version used.

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