drivers/ioexpander: Add const to the value array of multiwritepin

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-09-26 00:29:31 +08:00 committed by archer
parent e499c6c1c7
commit a37759a6a9
13 changed files with 30 additions and 30 deletions

View File

@ -255,7 +255,7 @@ 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 const uint8_t *pins,
FAR bool *values, int count);
FAR const bool *values, int count);
static int lmp92001_gpio_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count);
@ -1376,7 +1376,7 @@ 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 const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
}

View File

@ -119,7 +119,7 @@ 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 const uint8_t *pins,
FAR bool *values, int count);
FAR const bool *values, int count);
static int ioe_dummy_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count);
@ -442,7 +442,7 @@ 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 const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct ioe_dummy_dev_s *priv = (FAR struct ioe_dummy_dev_s *)dev;
uint8_t pin;

View File

@ -81,7 +81,7 @@ static int iso1h812g_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin,
FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int iso1h812g_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int iso1h812g_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
#endif
@ -336,8 +336,8 @@ static int iso1h812g_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin,
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int iso1h812g_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values,
int count)
FAR const uint8_t *pins,
FAR const bool *values, int count)
{
FAR struct iso1h812g_dev_s *priv = (FAR struct iso1h812g_dev_s *)dev;
int ret;

View File

@ -80,7 +80,7 @@ static int iso1i813t_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin,
FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int iso1i813t_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int iso1i813t_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
#endif
@ -349,8 +349,8 @@ static int iso1i813t_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin,
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int iso1i813t_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values,
int count)
FAR const uint8_t *pins,
FAR const bool *values, int count)
{
gpiowarn("WARNING: ISO1I813T is only input expander!\n");

View File

@ -74,7 +74,7 @@ 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 const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int mcp23x08_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
static int mcp23x08_multireadbuf(FAR struct ioexpander_dev_s *dev,
@ -562,7 +562,7 @@ static int mcp23x08_getmultibits(FAR struct mcp23x08_dev_s *priv,
static int mcp23x08_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct mcp23x08_dev_s *priv = (FAR struct mcp23x08_dev_s *)dev;
uint8_t addr = MCP23X08_GPIOA;

View File

@ -74,7 +74,7 @@ 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 const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int mcp23x17_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
static int mcp23x17_multireadbuf(FAR struct ioexpander_dev_s *dev,
@ -572,7 +572,7 @@ static int mcp23x17_getmultibits(FAR struct mcp23x17_dev_s *priv,
static int mcp23x17_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct mcp23x17_dev_s *priv = (FAR struct mcp23x17_dev_s *)dev;
uint8_t addr = MCP23X17_GPIOA;

View File

@ -67,7 +67,7 @@ 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 const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int pca9538_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
static int pca9538_multireadbuf(FAR struct ioexpander_dev_s *dev,
@ -536,7 +536,7 @@ static int pca9538_getmultibits(FAR struct pca9538_dev_s *pca, uint8_t addr,
static int pca9538_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct pca9538_dev_s *pca = (FAR struct pca9538_dev_s *)dev;
uint8_t addr = PCA9538_REG_OUTPUT;

View File

@ -71,7 +71,7 @@ static int pca9555_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin,
FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
static int pca9555_multireadbuf(FAR struct ioexpander_dev_s *dev,
@ -554,8 +554,8 @@ static int pca9555_getmultibits(FAR struct pca9555_dev_s *pca, uint8_t addr,
****************************************************************************/
static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values,
int count)
FAR const uint8_t *pins,
FAR const bool *values, int count)
{
FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev;
uint8_t addr = PCA9555_REG_OUTPUT;

View File

@ -61,7 +61,7 @@ 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 const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int pcf8574_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
#endif
@ -527,7 +527,7 @@ errout_with_lock:
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int pcf8574_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev;
uint8_t pin;

View File

@ -63,7 +63,7 @@ static int pcf8575_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin,
FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int pcf8575_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int pcf8575_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
#endif
@ -467,8 +467,8 @@ errout_with_lock:
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int pcf8575_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values,
int count)
FAR const uint8_t *pins,
FAR const bool *values, int count)
{
FAR struct pcf8575_dev_s *priv = (FAR struct pcf8575_dev_s *)dev;
uint8_t pin;

View File

@ -93,7 +93,7 @@ static int skel_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin,
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int skel_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count);
FAR const bool *values, int count);
static int skel_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count);
@ -430,7 +430,7 @@ 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 const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev;
ioe_pinset_t pinset;

View File

@ -68,7 +68,7 @@ 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 const uint8_t *pins, FAR bool *values, int count);
FAR const uint8_t *pins, FAR const bool *values, int count);
static int tca64_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values, int count);
#endif
@ -761,7 +761,7 @@ errout_with_lock:
#ifdef CONFIG_IOEXPANDER_MULTIPIN
static int tca64_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
FAR bool *values, int count)
FAR const bool *values, int count)
{
FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev;
ioe_pinset_t pinset;

View File

@ -331,8 +331,8 @@ struct ioexpander_ops_s
FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN
CODE int (*ioe_multiwritepin)(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values,
int count);
FAR const uint8_t *pins,
FAR const bool *values, int count);
CODE int (*ioe_multireadpin)(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins, FAR bool *values,
int count);