David Fletcher / Mbed 2 deprecated cc3100_Test_websock_Camera_CM4F

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

I2cconfig

I2cconfig

Functions

uint32_t I2CInit ()
 I2CInit.
int32_t I2CBufferRead (int32_t ucDevAddr, uint8_t *ucBuffer, int32_t ulSize, unsigned char ucFlags)
 Invokes the I2C driver APIs to read from the device.
int32_t I2CBufferWrite (int32_t ucDevAddr, uint8_t *ucBuffer, int32_t ulSize, unsigned char ucFlags)
 Invokes the I2C driver APIs to write to the specified address.

Function Documentation

int32_t I2CBufferRead ( int32_t  ucDevAddr,
uint8_t *  ucBuffer,
int32_t  ulSize,
unsigned char  ucFlags 
)

Invokes the I2C driver APIs to read from the device.

This assumes the device local address to read from is set using the I2CWrite API.

Parameters:
ucDevAddris the device I2C slave address
ucBufferis the pointer to the read data to be placed
ulSizeis the length of data to be read
ucFlagsFlag

This function works in a polling mode, 1. Writes the device register address to be written to. 2. In a loop, reads all the bytes over I2C

Returns:
0: Success, < 0: Failure.

Definition at line 94 of file i2cconfig.cpp.

int32_t I2CBufferWrite ( int32_t  ucDevAddr,
uint8_t *  ucBuffer,
int32_t  ulSize,
unsigned char  ucFlags 
)

Invokes the I2C driver APIs to write to the specified address.

Parameters:
ucDevAddris the device I2C slave address
ucBufferis the pointer to the data to be written
ulSizeis the length of data to be written
ucFlagsThis function works in a polling mode, 1. Writes the device register address to be written to. 2. In a loop, writes all the bytes over I2C
Returns:
0: Success, < 0: Failure.

Definition at line 144 of file i2cconfig.cpp.

uint32_t I2CInit ( void   )

I2CInit.

Parameters:
Delay
Returns:
None

Definition at line 70 of file i2cconfig.cpp.