www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |

SC145 i2cTransmitBlock returns values

Questions and discussions about the operating system RTOS-LNX and the corresponding C-LIB.
i2cTransmitBlock API function returns value 1, it is not documented. Is it error state or no. The same code on SC23 using I2C_transmit_block runs fine.

The return value of i2cTransmitBlock() is documented as:

Zero on success

The user should assume that any return value other than zero is an error. A return value of 1 can mean one of the following things:

    * The buffer parameter is NULL
    * The length parameter is NULL
    * The I2C bus index does not exist or could not be opened

Can it be that you are using a bus index that is unavailable on the new platform?
Michael G. Etairidis
Software Development
Beck IPC GmbH

Thanks for reply.

Input parameters of the i2cTransmitBlock are correct. The error ocurres due to previous I2C communication. After receiving char by API i2cReceiveChar I forgot call i2cRelease. When I added the i2cRelease after receiving data i2cTransmitBlock runs ok.

Great! I'm happy it worked. Have fun with developing with the SC145 and please do not hesitate to contact us if you have any further questions.
Michael G. Etairidis
Software Development
Beck IPC GmbH

Return to RTOS-LNX

Who is online

Users browsing this forum: No registered users and 2 guests