[U-Boot-Users] probably bug in ds1621.c
Palkin Andrey
apalkin at morion.ru
Wed Jul 2 07:42:01 CEST 2003
In dtt/ds1621.c file:
1.
int dtt_write(int sensor, int reg, int val)
{
int dlen;
uchar data[2];
/*
* Calculate sensor address and register.
*
*/
sensor = DTT_I2C_DEV_CODE + (sensor & sensor);
I think it should be:
int dtt_write(int sensor, int reg, int val)
{
int dlen;
uchar data[2];
/*
* Calculate sensor address and register.
*
*/
sensor = DTT_I2C_DEV_CODE + (sensor & 0x07);
2.
else if ((reg == DTT_WRITE_START_CONV) || (reg == DTT_WRITE_STOP_CONV)) {
dlen = 0;
data[0] = (char)0;
data[1] = (char)0;
}
I think it should be:
else if ((reg == DTT_WRITE_START_CONV) || (reg == DTT_WRITE_STOP_CONV)) {
dlen = 1;
data[0] = (char)0;
data[1] = (char)0;
}
differently MPC8260 I2C controller go in down
--
Palkin Andrey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changes.diff
Type: application/octet-stream
Size: 656 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20030702/21468bc8/attachment.obj
More information about the U-Boot
mailing list