Update ChangeLog
This commit is contained in:
parent
b947002d6a
commit
3971d97332
|
@ -10669,4 +10669,10 @@
|
|||
* libc/net: Add support for gethostbyname() and gethostbyaddr(). Also
|
||||
support included for the non-standard gethostbyname_r() and
|
||||
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
|
||||
|
|
|
@ -126,23 +126,23 @@ static int pca9555_setbit(FAR struct i2c_dev_s *i2c, uint8_t addr,
|
|||
uint8_t buf[2];
|
||||
buf[0] = addr;
|
||||
|
||||
if(pin>15)
|
||||
if (pin > 15)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
else if(pin>7)
|
||||
else if (pin > 7)
|
||||
{
|
||||
addr += 1;
|
||||
pin -= 8;
|
||||
}
|
||||
|
||||
ret = I2C_WRITEREAD(i2c, &addr, 1, &buf[1], 1);
|
||||
if(ret != 0)
|
||||
if (ret != 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(bitval)
|
||||
if (bitval)
|
||||
{
|
||||
buf[1] |= (1<<pin);
|
||||
}
|
||||
|
@ -168,18 +168,18 @@ static int pca9555_getbit(FAR struct i2c_dev_s *i2c, uint8_t addr,
|
|||
uint8_t buf;
|
||||
int ret;
|
||||
|
||||
if(pin>15)
|
||||
if (pin>15)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
else if(pin>7)
|
||||
else if (pin>7)
|
||||
{
|
||||
addr += 1;
|
||||
pin -= 8;
|
||||
}
|
||||
|
||||
ret = I2C_WRITEREAD(i2c, &addr, 1, &buf, 1);
|
||||
if(ret != 0)
|
||||
if (ret != 0)
|
||||
{
|
||||
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;
|
||||
int ival = (int)val;
|
||||
|
||||
if(opt == IOEXPANDER_OPTION_INVERT)
|
||||
if (opt == IOEXPANDER_OPTION_INVERT)
|
||||
{
|
||||
return pca9555_setbit(pca->i2c, PCA9555_REG_POLINV, pin, ival);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue