Change name of drivers/discrete back to drivers/ioexpander
This commit is contained in:
parent
78f2ce05f8
commit
8ab93fdf98
@ -378,16 +378,16 @@ if INPUT
|
|||||||
source drivers/input/Kconfig
|
source drivers/input/Kconfig
|
||||||
endif # INPUT
|
endif # INPUT
|
||||||
|
|
||||||
menuconfig DISCRETE_IO
|
menuconfig IOEXPANDER
|
||||||
bool "Discrete I/O"
|
bool "IO Expander Support"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
This directory holds implementations of IO expander and other
|
This directory holds implementations of IO expander drivers.
|
||||||
discrete I/O drivers.
|
See include/nuttx/discrete/ioexpander.h for registration information.
|
||||||
|
|
||||||
if DISCRETE_IO
|
if IOEXPANDER
|
||||||
source drivers/discrete/Kconfig
|
source drivers/ioexpander/Kconfig
|
||||||
endif # DISCRETE_IO
|
endif # IOEXPANDER
|
||||||
|
|
||||||
menuconfig LCD
|
menuconfig LCD
|
||||||
bool "LCD Driver Support"
|
bool "LCD Driver Support"
|
||||||
|
@ -53,7 +53,7 @@ include analog$(DELIM)Make.defs
|
|||||||
include audio$(DELIM)Make.defs
|
include audio$(DELIM)Make.defs
|
||||||
include bch$(DELIM)Make.defs
|
include bch$(DELIM)Make.defs
|
||||||
include input$(DELIM)Make.defs
|
include input$(DELIM)Make.defs
|
||||||
include discrete$(DELIM)Make.defs
|
include ioexpander$(DELIM)Make.defs
|
||||||
include lcd$(DELIM)Make.defs
|
include lcd$(DELIM)Make.defs
|
||||||
include leds$(DELIM)Make.defs
|
include leds$(DELIM)Make.defs
|
||||||
include loop$(DELIM)Make.defs
|
include loop$(DELIM)Make.defs
|
||||||
|
@ -3,15 +3,6 @@
|
|||||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||||
#
|
#
|
||||||
|
|
||||||
menuconfig IOEXPANDER
|
|
||||||
bool "IO Expander Support"
|
|
||||||
default n
|
|
||||||
---help---
|
|
||||||
This directory holds implementations of IO expander drivers.
|
|
||||||
See include/nuttx/discrete/ioexpander.h for registration information.
|
|
||||||
|
|
||||||
if IOEXPANDER
|
|
||||||
|
|
||||||
config IOEXPANDER_PCA9555
|
config IOEXPANDER_PCA9555
|
||||||
bool "PCA9555 I2C IO expander"
|
bool "PCA9555 I2C IO expander"
|
||||||
default n
|
default n
|
||||||
@ -48,5 +39,3 @@ config IOEXPANDER_MULTIPIN
|
|||||||
---help---
|
---help---
|
||||||
This settings enable the definition of routines for
|
This settings enable the definition of routines for
|
||||||
optimized simultaneous access to multiple pins.
|
optimized simultaneous access to multiple pins.
|
||||||
|
|
||||||
endif # IOEXPANDER
|
|
@ -1,5 +1,5 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# drivers/discrete/Make.defs
|
# drivers/ioexpander/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
# Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
# Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
||||||
@ -33,14 +33,6 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
# Don't build anything if there is no support for discrete devices
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DISCRETE_IO),y)
|
|
||||||
|
|
||||||
# Include buttion driver
|
|
||||||
# Although it makes sense for button drivers to be in the discrete driver
|
|
||||||
# directory, the button drivers current reside in the input dirver directory.
|
|
||||||
|
|
||||||
# Check if I/O expander support is enabled
|
# Check if I/O expander support is enabled
|
||||||
|
|
||||||
ifeq ($(CONFIG_IOEXPANDER),y)
|
ifeq ($(CONFIG_IOEXPANDER),y)
|
||||||
@ -50,12 +42,11 @@ ifeq ($(CONFIG_IOEXPANDER),y)
|
|||||||
ifeq ($(CONFIG_IOEXPANDER_PCA9555),y)
|
ifeq ($(CONFIG_IOEXPANDER_PCA9555),y)
|
||||||
CSRCS += pca9555.c
|
CSRCS += pca9555.c
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# Include discrete I/O device driver build support
|
# Include ioexpander I/O device driver build support
|
||||||
|
|
||||||
DEPPATH += --dep-path discrete
|
DEPPATH += --dep-path ioexpander
|
||||||
VPATH += :discrete
|
VPATH += :ioexpander
|
||||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)discrete}
|
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander}
|
||||||
|
|
||||||
endif
|
endif
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* drivers/discrete/pca9555.c
|
* drivers/ioexpander/pca9555.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
#include <nuttx/i2c.h>
|
#include <nuttx/i2c.h>
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
#include <nuttx/discrete/ioexpander.h>
|
#include <nuttx/ioexpander/ioexpander.h>
|
||||||
|
|
||||||
#include "pca9555.h"
|
#include "pca9555.h"
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ static int pca9555_getbit(FAR struct i2c_dev_s *i2c, uint8_t addr,
|
|||||||
* Name: pca9555_direction
|
* Name: pca9555_direction
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ static int pca9555_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin,
|
|||||||
* Name: pca9555_option
|
* Name: pca9555_option
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ static int pca9555_option(FAR struct ioexpander_dev_s *dev, uint8_t pin,
|
|||||||
* Name: pca9555_write
|
* Name: pca9555_write
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ static int pca9555_write(FAR struct ioexpander_dev_s *dev, uint8_t pin,
|
|||||||
* Name: pca9555_readpin
|
* Name: pca9555_readpin
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ static int pca9555_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin,
|
|||||||
* Name: pca9555_readbuf
|
* Name: pca9555_readbuf
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ static int pca9555_getmultibits(FAR struct i2c_dev_s *i2c, uint8_t addr,
|
|||||||
* Name: pca9555_multiwrite
|
* Name: pca9555_multiwrite
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ static int pca9555_multiwrite(FAR struct ioexpander_dev_s *dev,
|
|||||||
* Name: pca9555_multireadpin
|
* Name: pca9555_multireadpin
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev,
|
|||||||
* Name: pca9555_multireadbuf
|
* Name: pca9555_multireadbuf
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* See include/nuttx/discrete/ioexpander.h
|
* See include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -499,10 +499,16 @@ static void pca9555_irqworker(void *arg)
|
|||||||
|
|
||||||
static int pca9555_interrupt(int irq, FAR void *context)
|
static int pca9555_interrupt(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_PCA9555_MULTIPLE
|
||||||
/* To support multiple devices,
|
/* To support multiple devices,
|
||||||
* retrieve the priv structure using the irq number */
|
* retrieve the priv structure using the irq number.
|
||||||
|
*/
|
||||||
|
|
||||||
|
# warning Missing logic
|
||||||
|
|
||||||
|
#else
|
||||||
register FAR struct pca9555_dev_s *pca = &g_pca9555;
|
register FAR struct pca9555_dev_s *pca = &g_pca9555;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* In complex environments, we cannot do I2C transfers from the interrupt
|
/* In complex environments, we cannot do I2C transfers from the interrupt
|
||||||
* handler because semaphores are probably used to lock the I2C bus. In
|
* handler because semaphores are probably used to lock the I2C bus. In
|
@ -1,5 +1,5 @@
|
|||||||
/********************************************************************************************
|
/********************************************************************************************
|
||||||
* drivers/discrete/pca9555.h
|
* drivers/ioexpander/pca9555.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
||||||
@ -37,8 +37,8 @@
|
|||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#ifndef __DRIVERS_DISCRETE_PCA9555_H
|
#ifndef __DRIVERS_IOEXPANDER_PCA9555_H
|
||||||
#define __DRIVERS_DISCRETE_PCA9555_H
|
#define __DRIVERS_IOEXPANDER_PCA9555_H
|
||||||
|
|
||||||
/********************************************************************************************
|
/********************************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
#include <nuttx/wdog.h>
|
#include <nuttx/wdog.h>
|
||||||
#include <nuttx/clock.h>
|
#include <nuttx/clock.h>
|
||||||
#include <nuttx/discrete/ioexpander.h>
|
#include <nuttx/ioexpander/ioexpander.h>
|
||||||
#include <nuttx/discrete/pca9555.h>
|
#include <nuttx/ioexpander/pca9555.h>
|
||||||
|
|
||||||
#include <nuttx/i2c.h>
|
#include <nuttx/i2c.h>
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
@ -128,4 +128,4 @@ struct pca9555_dev_s
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_IOEXPANDER && CONFIG_IOEXPANDER_PCA9555 */
|
#endif /* CONFIG_IOEXPANDER && CONFIG_IOEXPANDER_PCA9555 */
|
||||||
#endif /* __DRIVERS_DISCRETE_PCA9555_H */
|
#endif /* __DRIVERS_IOEXPANDER_PCA9555_H */
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* include/nuttx/discrete/ioexpander.h
|
* include/nuttx/ioexpander/ioexpander.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
||||||
@ -33,8 +33,8 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __INCLUDE_NUTTX_DISCRETE_IOEXPANDER_H
|
#ifndef __INCLUDE_NUTTX_IOEXPANDER_IOEXPANDER_H
|
||||||
#define __INCLUDE_NUTTX_DISCRETE_IOEXPANDER_H
|
#define __INCLUDE_NUTTX_IOEXPANDER_IOEXPANDER_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@ -264,5 +264,5 @@ struct ioexpander_dev_s
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif //CONFIG_IOEXPANDER
|
#endif //CONFIG_IOEXPANDER
|
||||||
#endif //__INCLUDE_NUTTX_DISCRETE_IOEXPANDER_H
|
#endif //__INCLUDE_NUTTX_IOEXPANDER_IOEXPANDER_H
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/********************************************************************************************
|
/********************************************************************************************
|
||||||
* include/nuttx/discrete/pca9555.h
|
* include/nuttx/ioexpander/pca9555.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
||||||
@ -37,8 +37,8 @@
|
|||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#ifndef __INCLUDE_NUTTX_DISCRETE_PCA9555_H
|
#ifndef __INCLUDE_NUTTX_IOEXPANDER_PCA9555_H
|
||||||
#define __INCLUDE_NUTTX_DISCRETE_PCA9555_H
|
#define __INCLUDE_NUTTX_IOEXPANDER_PCA9555_H
|
||||||
|
|
||||||
#include <nuttx/i2c.h>
|
#include <nuttx/i2c.h>
|
||||||
|
|
||||||
@ -117,4 +117,4 @@ FAR struct ioexpander_dev_s* pca9555_initialize(FAR struct i2c_dev_s *dev,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __INCLUDE_NUTTX_DISCRETE_PCA9555_H */
|
#endif /* __INCLUDE_NUTTX_IOEXPANDER_PCA9555_H */
|
Loading…
x
Reference in New Issue
Block a user