Samsung Internal API reference  2.0
tee_i2c.h
Go to the documentation of this file.
1 
9 #ifndef __TEE_I2C_H__
10 #define __TEE_I2C_H__
11 
12 #include <stdint.h>
13 #include <tee_internal_api.h>
14 #include <driver/i2c/i2c.h>
15 #include <driver/hsi2c/hsi2c.h>
16 
20 typedef struct {
21  void *buf;
22  size_t len;
24 
26 struct __TEES_I2CHandlerImpl;
32 typedef struct __TEES_I2CHandlerImpl *TEES_I2CHandler;
33 
42 DSO_EXPORT TEE_Result TEES_I2CInit(const char *name, uint32_t transac_len,
43  TEES_I2CHandler *handler);
44 
51 DSO_EXPORT TEE_Result TEES_I2CExit(TEES_I2CHandler handler);
52 
61 DSO_EXPORT TEE_Result TEES_I2CWrite(TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *tx);
62 
71 DSO_EXPORT TEE_Result TEES_I2CRead(TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *rx);
72 
82 DSO_EXPORT TEE_Result TEES_I2CWriteRead(TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *tx, TEES_I2CTransfer *rx);
83 
84 #endif /* __TEE_I2C_H__ */
85 
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.
TEE_Result TEES_I2CWrite(TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *tx)
Write data buffer tx to initialized I2C device.
TEE_Result TEES_I2CInit(const char *name, uint32_t transac_len, TEES_I2CHandler *handler)
Initialize I2C device and set transfer parameters to handler.
TEE_Result TEES_I2CRead(TEES_I2CHandler handler, uint8_t chip, TEES_I2CTransfer *rx)
Read data buffer rx from initialized I2C device.
void * buf
Definition: tee_i2c.h:21
I2C data transfer buffer.
Definition: tee_i2c.h:20
TEE_Result TEES_I2CExit(TEES_I2CHandler handler)
Terminate connection to I2C device.
struct __TEES_I2CHandlerImpl * TEES_I2CHandler
Definition: tee_i2c.h:32
size_t len
Definition: tee_i2c.h:22