nuttx/drivers/ioexpander/Make.defs
Michal Lenc bf90361895 ioexpander: add support for pcf8575 expander
This adds support for 16 bit io expander pcf8575. The driver is basically
the same as for pcf8574 however it is for 16 bits instead of 8 bits. Since
pcf8575 and pcf8574 can be both used on the same i2c bus the driver for
pcf8575 is implemented in a different file to reduce the code size
and complexity and to have less if statements in the driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-03 06:52:27 -07:00

93 lines
2.3 KiB
Plaintext

############################################################################
# drivers/ioexpander/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
# Check if I/O expander support is enabled
ifeq ($(CONFIG_IOEXPANDER),y)
# Include the selected I/O expander drivers
ifeq ($(CONFIG_IOEXPANDER_RPMSG),y)
CSRCS += ioe_rpmsg.c
endif
ifeq ($(CONFIG_IOEXPANDER_DUMMY),y)
CSRCS += ioe_dummy.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCA9555),y)
CSRCS += pca9555.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCA9538),y)
CSRCS += pca9538.c
endif
ifeq ($(CONFIG_IOEXPANDER_TCA64XX),y)
CSRCS += tca64xx.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCF8574),y)
CSRCS += pcf8574.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCF8575),y)
CSRCS += pcf8575.c
endif
ifeq ($(CONFIG_IOEXPANDER_MCP23X17),y)
CSRCS += mcp23x17.c
endif
ifeq ($(CONFIG_IOEXPANDER_SX1509),y)
CSRCS += sx1509.c
endif
endif # CONFIG_IOEXPANDER
# GPIO test device driver (independent of IOEXPANDERS)
ifeq ($(CONFIG_DEV_GPIO),y)
CSRCS += gpio.c
ifeq ($(CONFIG_GPIO_LOWER_HALF),y)
CSRCS += gpio_lower_half.c
endif
endif
# The following implements an awkward OR
ifeq ($(CONFIG_IOEXPANDER),y)
# Include ioexpander I/O device driver build support
DEPPATH += --dep-path ioexpander
VPATH += :ioexpander
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander
else ifeq ($(CONFIG_DEV_GPIO),y)
# Include ioexpander I/O device driver build support
DEPPATH += --dep-path ioexpander
VPATH += :ioexpander
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander
endif