Update ChangeLog

This commit is contained in:
Gregory Nutt 2015-07-09 07:36:10 -06:00
parent b947002d6a
commit 3971d97332
2 changed files with 15 additions and 9 deletions

View File

@ -10669,4 +10669,10 @@
* libc/net: Add support for gethostbyname() and gethostbyaddr(). Also * libc/net: Add support for gethostbyname() and gethostbyaddr(). Also
support included for the non-standard gethostbyname_r() and support included for the non-standard gethostbyname_r() and
gethostbyaddr_r() (2015-07-08). gethostbyaddr_r() (2015-07-08).
* drivers/ioexpander and include/nuttx/ioexpander: This commit adds:
- headers in nuttx/ioexpander to define the "generic" ioexpander
framework
- files in drivers/ioexpander for the implementation of the NXP
PCA9555 framework
- bindings in drivers/Kconfig and drivers/Makefile
From Sebastien Lorquet

View File

@ -126,23 +126,23 @@ static int pca9555_setbit(FAR struct i2c_dev_s *i2c, uint8_t addr,
uint8_t buf[2]; uint8_t buf[2];
buf[0] = addr; buf[0] = addr;
if(pin>15) if (pin > 15)
{ {
return -ENXIO; return -ENXIO;
} }
else if(pin>7) else if (pin > 7)
{ {
addr += 1; addr += 1;
pin -= 8; pin -= 8;
} }
ret = I2C_WRITEREAD(i2c, &addr, 1, &buf[1], 1); ret = I2C_WRITEREAD(i2c, &addr, 1, &buf[1], 1);
if(ret != 0) if (ret != 0)
{ {
return ret; return ret;
} }
if(bitval) if (bitval)
{ {
buf[1] |= (1<<pin); buf[1] |= (1<<pin);
} }
@ -168,18 +168,18 @@ static int pca9555_getbit(FAR struct i2c_dev_s *i2c, uint8_t addr,
uint8_t buf; uint8_t buf;
int ret; int ret;
if(pin>15) if (pin>15)
{ {
return -ENXIO; return -ENXIO;
} }
else if(pin>7) else if (pin>7)
{ {
addr += 1; addr += 1;
pin -= 8; pin -= 8;
} }
ret = I2C_WRITEREAD(i2c, &addr, 1, &buf, 1); ret = I2C_WRITEREAD(i2c, &addr, 1, &buf, 1);
if(ret != 0) if (ret != 0)
{ {
return ret; return ret;
} }
@ -218,7 +218,7 @@ static int pca9555_option(FAR struct ioexpander_dev_s *dev, uint8_t pin,
FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s*)dev; FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s*)dev;
int ival = (int)val; int ival = (int)val;
if(opt == IOEXPANDER_OPTION_INVERT) if (opt == IOEXPANDER_OPTION_INVERT)
{ {
return pca9555_setbit(pca->i2c, PCA9555_REG_POLINV, pin, ival); return pca9555_setbit(pca->i2c, PCA9555_REG_POLINV, pin, ival);
} }