Samsung Internal API reference  2.0

Data Structures

struct  TEES_I2CTransfer
 I2C data transfer buffer. More...
 

Typedefs

typedef struct __TEES_I2CHandlerImpl * TEES_I2CHandler
 

Functions

TEE_Result TEES_I2CInit (const char *name, uint32_t transac_len, TEES_I2CHandler *handler)
 Initialize I2C device and set transfer parameters to handler. More...
 
TEE_Result TEES_I2CExit (TEES_I2CHandler handler)
 Terminate connection to I2C device. More...
 
TEE_Result TEES_I2CWrite (TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *tx)
 Write data buffer tx to initialized I2C device. More...
 
TEE_Result TEES_I2CRead (TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *rx)
 Read data buffer rx from initialized I2C device. More...
 
TEE_Result TEES_I2CWriteRead (TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *tx, TEES_I2CTransfer *rx)
 Write data buffer tx and read buffer rx from initialized I2C device at the same time. More...
 

Detailed Description

Provides set of functions to manipulate device connected with I2C bus.


Data Structure Documentation

struct TEES_I2CTransfer

I2C data transfer buffer.

Data Fields
void * buf

pointer to buffer used for I2C data transfer.

size_t len

size of buffer buf.

Typedef Documentation

#include <tee_i2c.h>

Handler for I2C device.

Function Documentation

TEE_Result TEES_I2CExit ( TEES_I2CHandler  handler)

#include <tee_i2c.h>

Terminate connection to I2C device.

Parameters
[in]handlerinitialized parameters.
Return values
TEE_SUCCESSin case of success.
TEE_ERROR_xxxin case of errors.
TEE_Result TEES_I2CInit ( const char *  name,
uint32_t  transac_len,
TEES_I2CHandler handler 
)

#include <tee_i2c.h>

Initialize I2C device and set transfer parameters to handler.

Parameters
[in]nameinterface name.
[in]transac_lensize of transaction.
[out]handlerPointer to structure which contains set up parameters.
Return values
TEE_SUCCESSin case of success.
TEE_ERROR_xxxin case of errors.
TEE_Result TEES_I2CRead ( TEES_I2CHandler  handler,
uint8_t  chip,
TEES_I2CTransfer rx 
)

#include <tee_i2c.h>

Read data buffer rx from initialized I2C device.

Parameters
[in]handlerinitialized parameters.
[in]chipaddress of target device on I2C bus.
[out]rxPointer to buffer to receive.
Return values
TEE_SUCCESSin case of success.
TEE_ERROR_xxxin case of errors.
TEE_Result TEES_I2CWrite ( TEES_I2CHandler  handler,
uint8_t  chip,
TEES_I2CTransfer tx 
)

#include <tee_i2c.h>

Write data buffer tx to initialized I2C device.

Parameters
[in]handlerinitialized parameters.
[in]chipaddress of target device on I2C bus.
[in]txPointer to buffer to transfer.
Return values
TEE_SUCCESSin case of success.
TEE_ERROR_xxxin case of errors.
TEE_Result TEES_I2CWriteRead ( TEES_I2CHandler  handler,
uint8_t  chip,
TEES_I2CTransfer tx,
TEES_I2CTransfer rx 
)

#include <tee_i2c.h>

Write data buffer tx and read buffer rx from initialized I2C device at the same time.

Parameters
[in]handlerinitialized parameters.
[in]chipaddress of target device on I2C bus.
[in]txPointer to buffer to transfer.
[out]rxPointer to buffer to receive.
Return values
TEE_SUCCESSin case of success.
TEE_ERROR_xxxin case of errors.