C API for BALTECH SDK
i2c.h
Go to the documentation of this file.
1 
11 #ifndef __BRP_BALTECH_API_CMDS_I2C_H__
12 #define __BRP_BALTECH_API_CMDS_I2C_H__
13 #include "../typedefs.h"
18 #define BRP_I2c_ErrI2CRead BRP_ERR_STATUS(0x0800, 0x01)
19 
23 #define BRP_I2c_ErrI2CWrite BRP_ERR_STATUS(0x0800, 0x02)
24 
31 brp_errcode brp_I2c_SetSpeed(brp_protocol protocol, bool FastMode);
43 brp_errcode brp_I2c_Read(brp_protocol protocol, unsigned Address, unsigned ReadLen, brp_buf* ReadData, size_t* ReadData_len, brp_mempool *mempool);
53 brp_errcode brp_I2c_Write(brp_protocol protocol, unsigned Address, brp_buf WriteData, size_t WriteData_len);
67 brp_errcode brp_I2c_TxRx(brp_protocol protocol, unsigned Address, brp_buf CmdData, size_t CmdData_len, unsigned ReadLen, brp_buf* ReadData, size_t* ReadData_len, brp_mempool *mempool);
68 #endif
69 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
brp_errcode brp_I2c_Read(brp_protocol protocol, unsigned Address, unsigned ReadLen, brp_buf *ReadData, size_t *ReadData_len, brp_mempool *mempool)
brp_errcode brp_I2c_Write(brp_protocol protocol, unsigned Address, brp_buf WriteData, size_t WriteData_len)
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
brp_errcode brp_I2c_SetSpeed(brp_protocol protocol, bool FastMode)
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
brp_errcode brp_I2c_TxRx(brp_protocol protocol, unsigned Address, brp_buf CmdData, size_t CmdData_len, unsigned ReadLen, brp_buf *ReadData, size_t *ReadData_len, brp_mempool *mempool)
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61