diff --git a/drivers/analog/lmp92001.c b/drivers/analog/lmp92001.c index 8bb51233bc..026d60fad3 100644 --- a/drivers/analog/lmp92001.c +++ b/drivers/analog/lmp92001.c @@ -254,11 +254,11 @@ static int lmp92001_gpio_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count); + FAR const uint8_t *pins, + FAR bool *values, int count); static int lmp92001_gpio_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count); + FAR const uint8_t *pins, + FAR bool *values, int count); #endif #ifdef CONFIG_IOEXPANDER_INT_ENABLE static FAR void *lmp92001_gpio_attach(FAR struct ioexpander_dev_s *dev, @@ -1375,8 +1375,8 @@ static int lmp92001_gpio_readpin(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { } @@ -1398,8 +1398,8 @@ static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev, ****************************************************************************/ static int lmp92001_gpio_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { } #endif diff --git a/drivers/ioexpander/ioe_dummy.c b/drivers/ioexpander/ioe_dummy.c index 445f336e66..bd2af0de6a 100644 --- a/drivers/ioexpander/ioe_dummy.c +++ b/drivers/ioexpander/ioe_dummy.c @@ -118,11 +118,11 @@ static int ioe_dummy_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count); + FAR const uint8_t *pins, + FAR bool *values, int count); static int ioe_dummy_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count); + FAR const uint8_t *pins, + FAR bool *values, int count); #endif #ifdef CONFIG_IOEXPANDER_INT_ENABLE static FAR void *ioe_dummy_attach(FAR struct ioexpander_dev_s *dev, @@ -441,8 +441,8 @@ static int ioe_dummy_readpin(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct ioe_dummy_dev_s *priv = (FAR struct ioe_dummy_dev_s *)dev; uint8_t pin; @@ -491,8 +491,8 @@ static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int ioe_dummy_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct ioe_dummy_dev_s *priv = (FAR struct ioe_dummy_dev_s *)dev; ioe_pinset_t inval; diff --git a/drivers/ioexpander/mcp23x08.c b/drivers/ioexpander/mcp23x08.c index f300e719da..730a1faf6a 100644 --- a/drivers/ioexpander/mcp23x08.c +++ b/drivers/ioexpander/mcp23x08.c @@ -74,9 +74,9 @@ static int mcp23x08_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int mcp23x08_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int mcp23x08_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int mcp23x08_multireadbuf(FAR struct ioexpander_dev_s *dev, FAR uint8_t *pins, FAR bool *values, int count); #endif @@ -561,8 +561,8 @@ static int mcp23x08_getmultibits(FAR struct mcp23x08_dev_s *priv, ****************************************************************************/ static int mcp23x08_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct mcp23x08_dev_s *priv = (FAR struct mcp23x08_dev_s *)dev; uint8_t addr = MCP23X08_GPIOA; @@ -659,8 +659,8 @@ static int mcp23x08_multiwritepin(FAR struct ioexpander_dev_s *dev, ****************************************************************************/ static int mcp23x08_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct mcp23x08_dev_s *priv = (FAR struct mcp23x08_dev_s *)dev; int ret; @@ -697,8 +697,8 @@ static int mcp23x08_multireadpin(FAR struct ioexpander_dev_s *dev, ****************************************************************************/ static int mcp23x08_multireadbuf(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct mcp23x08_dev_s *priv = (FAR struct mcp23x08_dev_s *)dev; int ret; diff --git a/drivers/ioexpander/mcp23x17.c b/drivers/ioexpander/mcp23x17.c index ed6a272cdd..418175ce2d 100644 --- a/drivers/ioexpander/mcp23x17.c +++ b/drivers/ioexpander/mcp23x17.c @@ -74,11 +74,11 @@ static int mcp23x17_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int mcp23x17_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int mcp23x17_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int mcp23x17_multireadbuf(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); #endif #ifdef CONFIG_IOEXPANDER_INT_ENABLE static FAR void *mcp23x17_attach(FAR struct ioexpander_dev_s *dev, @@ -571,8 +571,8 @@ static int mcp23x17_getmultibits(FAR struct mcp23x17_dev_s *priv, ****************************************************************************/ static int mcp23x17_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct mcp23x17_dev_s *priv = (FAR struct mcp23x17_dev_s *)dev; uint8_t addr = MCP23X17_GPIOA; @@ -669,8 +669,8 @@ static int mcp23x17_multiwritepin(FAR struct ioexpander_dev_s *dev, ****************************************************************************/ static int mcp23x17_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct mcp23x17_dev_s *priv = (FAR struct mcp23x17_dev_s *)dev; int ret; @@ -707,8 +707,8 @@ static int mcp23x17_multireadpin(FAR struct ioexpander_dev_s *dev, ****************************************************************************/ static int mcp23x17_multireadbuf(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct mcp23x17_dev_s *priv = (FAR struct mcp23x17_dev_s *)dev; int ret; diff --git a/drivers/ioexpander/pca9538.c b/drivers/ioexpander/pca9538.c index 311718629d..d0c75780d3 100644 --- a/drivers/ioexpander/pca9538.c +++ b/drivers/ioexpander/pca9538.c @@ -67,9 +67,9 @@ static int pca9538_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int pca9538_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int pca9538_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int pca9538_multireadbuf(FAR struct ioexpander_dev_s *dev, FAR uint8_t *pins, FAR bool *values, int count); #endif @@ -535,8 +535,8 @@ static int pca9538_getmultibits(FAR struct pca9538_dev_s *pca, uint8_t addr, ****************************************************************************/ static int pca9538_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct pca9538_dev_s *pca = (FAR struct pca9538_dev_s *)dev; uint8_t addr = PCA9538_REG_OUTPUT; @@ -628,8 +628,8 @@ static int pca9538_multiwritepin(FAR struct ioexpander_dev_s *dev, ****************************************************************************/ static int pca9538_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct pca9538_dev_s *pca = (FAR struct pca9538_dev_s *)dev; int ret; diff --git a/drivers/ioexpander/pcf8574.c b/drivers/ioexpander/pcf8574.c index 8ceeac2484..aa8c9edf01 100644 --- a/drivers/ioexpander/pcf8574.c +++ b/drivers/ioexpander/pcf8574.c @@ -61,9 +61,9 @@ static int pcf8574_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int pcf8574_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int pcf8574_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); #endif #ifdef CONFIG_IOEXPANDER_INT_ENABLE static FAR void *pcf8574_attach(FAR struct ioexpander_dev_s *dev, @@ -526,8 +526,8 @@ errout_with_lock: #ifdef CONFIG_IOEXPANDER_MULTIPIN static int pcf8574_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; uint8_t pin; @@ -606,8 +606,8 @@ static int pcf8574_multiwritepin(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int pcf8574_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; uint8_t regval; diff --git a/drivers/ioexpander/skeleton.c b/drivers/ioexpander/skeleton.c index 7505e13328..1fe9c3541f 100644 --- a/drivers/ioexpander/skeleton.c +++ b/drivers/ioexpander/skeleton.c @@ -92,12 +92,14 @@ static int skel_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int skel_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count); + FAR const uint8_t *pins, + FAR bool *values, int count); static int skel_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, + FAR bool *values, int count); static int skel_multireadbuf(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, + FAR bool *values, int count); #endif #ifdef CONFIG_IOEXPANDER_INT_ENABLE static int skel_attach(FAR struct ioexpander_dev_s *dev, @@ -427,7 +429,8 @@ static int skel_getmultibits(FAR struct skel_dev_s *priv, FAR uint8_t *pins, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int skel_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; ioe_pinset_t pinset; @@ -494,7 +497,8 @@ static int skel_multiwritepin(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int skel_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; int ret; @@ -536,7 +540,8 @@ static int skel_multireadpin(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_IOEXPANDER_MULTIPIN static int skel_multireadbuf(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; int ret; diff --git a/drivers/ioexpander/tca64xx.c b/drivers/ioexpander/tca64xx.c index d27ad929d7..eceb96a314 100644 --- a/drivers/ioexpander/tca64xx.c +++ b/drivers/ioexpander/tca64xx.c @@ -68,9 +68,9 @@ static int tca64_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN static int tca64_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); static int tca64_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, int count); + FAR const uint8_t *pins, FAR bool *values, int count); #endif #ifdef CONFIG_IOEXPANDER_INT_ENABLE static FAR void *tca64_attach(FAR struct ioexpander_dev_s *dev, @@ -163,8 +163,8 @@ static const struct tca64_part_s g_tca64_parts[TCA64_NPARTS] = * ****************************************************************************/ -static FAR const struct tca64_part_s *tca64_getpart( - FAR struct tca64_dev_s *priv) +static FAR const struct tca64_part_s * +tca64_getpart(FAR struct tca64_dev_s *priv) { DEBUGASSERT(priv != NULL && priv->config != NULL && priv->config->part < TCA64_NPARTS); @@ -366,7 +366,7 @@ static int tca64_putreg(struct tca64_dev_s *priv, uint8_t regaddr, ****************************************************************************/ static int tca64_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, - int direction) + int direction) { FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; uint8_t regaddr; @@ -608,7 +608,7 @@ static int tca64_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, ****************************************************************************/ static int tca64_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, - bool value) + bool value) { FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; uint8_t regaddr; @@ -688,7 +688,7 @@ errout_with_lock: ****************************************************************************/ static int tca64_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, - FAR bool *value) + FAR bool *value) { FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; uint8_t regaddr; @@ -760,8 +760,8 @@ errout_with_lock: #ifdef CONFIG_IOEXPANDER_MULTIPIN static int tca64_multiwritepin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; ioe_pinset_t pinset; @@ -848,8 +848,8 @@ errout_with_lock: #ifdef CONFIG_IOEXPANDER_MULTIPIN static int tca64_multireadpin(FAR struct ioexpander_dev_s *dev, - FAR uint8_t *pins, FAR bool *values, - int count) + FAR const uint8_t *pins, + FAR bool *values, int count) { FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; ioe_pinset_t pinset; @@ -1344,8 +1344,9 @@ static void tca64_poll_expiry(wdparm_t arg) * ****************************************************************************/ -FAR struct ioexpander_dev_s *tca64_initialize(FAR struct i2c_master_s *i2c, - FAR struct tca64_config_s *config) +FAR struct ioexpander_dev_s * +tca64_initialize(FAR struct i2c_master_s *i2c, + FAR struct tca64_config_s *config) { FAR struct tca64_dev_s *priv; int ret;