pca9555: fix const correctness of pin set parameters

This commit is contained in:
Sebastien Lorquet
2023-06-13 17:23:58 +02:00
committed by Alan Carvalho de Assis
parent 59c01ea05d
commit 43fec5dd53
2 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -71,11 +71,11 @@ static int pca9555_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin,
FAR bool *value); FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN #ifdef CONFIG_IOEXPANDER_MULTIPIN
static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev, static int pca9555_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 pca9555_multireadpin(FAR struct ioexpander_dev_s *dev, static int pca9555_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 pca9555_multireadbuf(FAR struct ioexpander_dev_s *dev, static int pca9555_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 #endif
#ifdef CONFIG_IOEXPANDER_INT_ENABLE #ifdef CONFIG_IOEXPANDER_INT_ENABLE
static FAR void *pca9555_attach(FAR struct ioexpander_dev_s *dev, static FAR void *pca9555_attach(FAR struct ioexpander_dev_s *dev,
@@ -492,7 +492,7 @@ static int pca9555_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin,
****************************************************************************/ ****************************************************************************/
static int pca9555_getmultibits(FAR struct pca9555_dev_s *pca, uint8_t addr, static int pca9555_getmultibits(FAR struct pca9555_dev_s *pca, uint8_t addr,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count) int count)
{ {
uint8_t buf[2]; uint8_t buf[2];
@@ -554,7 +554,7 @@ static int pca9555_getmultibits(FAR struct pca9555_dev_s *pca, uint8_t addr,
****************************************************************************/ ****************************************************************************/
static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev, static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count) int count)
{ {
FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev; FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev;
@@ -652,7 +652,7 @@ static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev,
****************************************************************************/ ****************************************************************************/
static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev, static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count) int count)
{ {
FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev; FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev;
@@ -690,7 +690,7 @@ static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev,
****************************************************************************/ ****************************************************************************/
static int pca9555_multireadbuf(FAR struct ioexpander_dev_s *dev, static int pca9555_multireadbuf(FAR struct ioexpander_dev_s *dev,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count) int count)
{ {
FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev; FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev;
@@ -747,7 +747,7 @@ static FAR void *pca9555_attach(FAR struct ioexpander_dev_s *dev,
ret = nxmutex_lock(&pca->lock); ret = nxmutex_lock(&pca->lock);
if (ret < 0) if (ret < 0)
{ {
return ret; return NULL;
} }
/* Find and available in entry in the callback table */ /* Find and available in entry in the callback table */
+3 -3
View File
@@ -322,13 +322,13 @@ struct ioexpander_ops_s
FAR bool *value); FAR bool *value);
#ifdef CONFIG_IOEXPANDER_MULTIPIN #ifdef CONFIG_IOEXPANDER_MULTIPIN
CODE int (*ioe_multiwritepin)(FAR struct ioexpander_dev_s *dev, CODE int (*ioe_multiwritepin)(FAR struct ioexpander_dev_s *dev,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count); int count);
CODE int (*ioe_multireadpin)(FAR struct ioexpander_dev_s *dev, CODE int (*ioe_multireadpin)(FAR struct ioexpander_dev_s *dev,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count); int count);
CODE int (*ioe_multireadbuf)(FAR struct ioexpander_dev_s *dev, CODE int (*ioe_multireadbuf)(FAR struct ioexpander_dev_s *dev,
FAR uint8_t *pins, FAR bool *values, FAR const uint8_t *pins, FAR bool *values,
int count); int count);
#endif #endif
#ifdef CONFIG_IOEXPANDER_INT_ENABLE #ifdef CONFIG_IOEXPANDER_INT_ENABLE