src/bf52xI2cMaster.c File Reference

#include "tll_common.h"
#include "bf52xI2cMaster.h"
#include "bf52x_uart.h"

Include dependency graph for bf52xI2cMaster.c:


Functions

int bf52xI2cMaster_init (unsigned char is_sccb, int clock)
 Initializes the I2C interface as master.
int bf52x_i2c_master_probe (unsigned char addr)
 Probes for the I2C slave device.
int bf52xI2cMaster_send (bf52x_i2c_cmd_data_t *i2c_trans_p)
 Send data.
int bf52xI2cMaster_receive (bf52x_i2c_cmd_data_t *i2c_trans_p)
 Receive data.

Function Documentation

int bf52x_i2c_master_probe ( unsigned char  addr  ) 

Probes for the I2C slave device.

This function probes and checks if the specified slave device is present or not.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
sccb - Should be non-zero to configure the interface as SCCB interface. Zero for normal I2C interface.
Returns:
Zero if the device is probed and available. Else negative value.

int bf52xI2cMaster_init ( unsigned char  is_sccb,
int  clock 
)

Initializes the I2C interface as master.

This function initializes the TWI interface as master.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
sccb - 0 to use standard I2C interface 1 to use standard SCCB interface.
Returns:
TLL_STATUS_SUCCESS or TLL_STATUS_INVALID

int bf52xI2cMaster_receive ( bf52x_i2c_cmd_data_t i2c_trans_p  ) 

Receive data.

This function receives the data specified into the bf52x_i2c_cmd_data_t data structure.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
i2c_trans - Holds the transaction information.
Returns:
Zero if the device data transfer was successful. Else negative value.

int bf52xI2cMaster_send ( bf52x_i2c_cmd_data_t i2c_trans_p  ) 

Send data.

This function sends the data specified in the bf52x_i2c_cmd_data_t data structure.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
i2c_trans - Holds the transaction information.
Returns:
Zero if the device data transfer was successful. Else negative value.


Generated on 3 Mar 2014 for PAL bare-c Library by  doxygen 1.4.7