Errata in I2CHW example

This forum is for the reporting and discussion of the PSoC documentation from Cypress (data sheet, TRM, user guide, etc).

Moderator: fsu

Errata in I2CHW example

Postby Yoldi » Tue May 05, 2009 11:31 pm

Hi.

The examples present into the modules datasheet are a good starting point for a module testing, but in some cases it is better the PsoC forum.

In the case of the I2CHW there is an errata in the examples, the loop that you find to check the transfer is:
/* Wait until the data is transferred */
while(!I2CHW_bReadI2CStatus() & I2CHW_WR_COMPLETE);
but the ! should affect the entire operation, id est:
// Wait for the operation to complete
while (!(I2CHW_1_bReadI2CStatus() & I2CHW_WR_COMPLETE));
as it is in a graaja example.

A bracket is one of the simple things that it is easy to miss into a code (it was that happened in my case).

Thanks to graaja for the right example.

Regards.
Yoldi.
Yoldi
Newbie
Newbie
 
Posts: 1
Joined: Tue May 05, 2009 6:44 am

Re: Errata in I2CHW example

Postby graaja » Thu May 07, 2009 11:49 am

Hi Yoldi,

I have notified the concerned people to fix this sample code.
User avatar
graaja
PSoC Master
PSoC Master
 
Posts: 3084
Joined: Thu Dec 18, 2003 4:35 pm
Website: http://www.planetpsoc.com
Location: India


Return to “%s” PSoC Documentation Feedback

Who is online

Users browsing this forum: No registered users and 1 guest