mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
PGA11x driver belongs in analog/ not input/
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4978 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
cf48e3c73f
commit
7e70b4bdf6
@ -3072,4 +3072,7 @@
|
||||
TI PGA112/3/6/7 amplifier/multiplexer parts.
|
||||
* configs/mirtoo/README.txt, nsh/defconfig, and nxffs/defconfig: Add support
|
||||
for the PGA117 on the Mirtoo module.
|
||||
* drivers/analog/pga11x.c and include/nuttx/analog/pga11x.h: These belong in
|
||||
the analog subdirectories, not input.
|
||||
|
||||
|
||||
|
||||
@ -828,9 +828,9 @@ Where <subdir> is one of the following:
|
||||
The Mirtoo's PGA117 amplifier/multipexer is not used by this configuration
|
||||
but can be enabled by setting:
|
||||
|
||||
CONFIG_INPUT=y : Enable support for INPUT devices
|
||||
CONFIG_SPI_OWNBUS=y : If the PGA117 is the only device on the bus
|
||||
CONFIG_INPUT_PGA11X=y : Enable support for the PGA117
|
||||
CONFIG_ADC=y : Enable support for analog input devices
|
||||
CONFIG_SPI_OWNBUS=y : If the PGA117 is the only device on the bus
|
||||
CONFIG_ADC_PGA11X=y : Enable support for the PGA117
|
||||
|
||||
nxffs:
|
||||
======
|
||||
@ -914,7 +914,7 @@ Where <subdir> is one of the following:
|
||||
The Mirtoo's PGA117 amplifier/multipexer is not used by this configuration
|
||||
but can be enabled by setting:
|
||||
|
||||
CONFIG_INPUT=y : Enable support for INPUT devices
|
||||
CONFIG_SPI_OWNBUS=n : The PGA117 is *not* the only device on the bus
|
||||
CONFIG_INPUT_PGA11X=y : Enable support for the PGA117
|
||||
CONFIG_ADC=y : Enable support for anlog input devices
|
||||
CONFIG_SPI_OWNBUS=n : The PGA117 is *not* the only device on the bus
|
||||
CONFIG_ADC_PGA11X=y : Enable support for the PGA117
|
||||
|
||||
|
||||
@ -750,10 +750,10 @@ CONFIG_USBMSC_REMOVABLE=y
|
||||
# PGA117 support
|
||||
#
|
||||
# Prerequisites:
|
||||
# CONFIG_INPUT=y is needed to enable support for INPUT devices
|
||||
# CONFIG_ADC=y is needed to enable support for analog input devices
|
||||
#
|
||||
# CONFIG_INPUT_PGA11X
|
||||
# Enables support for the PGA11X driver (Needs CONFIG_INPUT)
|
||||
# CONFIG_ADC_PGA11X
|
||||
# Enables support for the PGA11X driver (Needs CONFIG_ADC)
|
||||
# CONFIG_PGA11X_SPIFREQUENCY
|
||||
# SPI frequency. Default 1MHz
|
||||
# CONFIG_PGA11X_DAISYCHAIN
|
||||
@ -773,11 +773,11 @@ CONFIG_USBMSC_REMOVABLE=y
|
||||
# CONFIG_DEBUG_SPI -- With CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE,
|
||||
# this will enable debug output from the PGA117 driver.
|
||||
#
|
||||
CONFIG_INPUT=n
|
||||
CONFIG_ADC=n
|
||||
CONFIG_SPI_OWNBUS=y
|
||||
CONFIG_DEBUG_SPI=n
|
||||
|
||||
CONFIG_INPUT_PGA11X=n
|
||||
CONFIG_ADC_PGA11X=n
|
||||
#CONFIG_PGA11X_SPIFREQUENCY
|
||||
CONFIG_PGA11X_DAISYCHAIN=n
|
||||
CONFIG_PGA11X_SPIMODE=1
|
||||
|
||||
@ -750,10 +750,10 @@ CONFIG_USBMSC_REMOVABLE=y
|
||||
# PGA117 support
|
||||
#
|
||||
# Prerequisites:
|
||||
# CONFIG_INPUT=y is needed to enable support for INPUT devices
|
||||
# CONFIG_ADC=y is needed to enable support for analog input devices
|
||||
#
|
||||
# CONFIG_INPUT_PGA11X
|
||||
# Enables support for the PGA11X driver (Needs CONFIG_INPUT)
|
||||
# CONFIG_ADC_PGA11X
|
||||
# Enables support for the PGA11X driver (Needs CONFIG_ADC)
|
||||
# CONFIG_PGA11X_SPIFREQUENCY
|
||||
# SPI frequency. Default 1MHz
|
||||
# CONFIG_PGA11X_DAISYCHAIN
|
||||
@ -776,11 +776,11 @@ CONFIG_USBMSC_REMOVABLE=y
|
||||
# CONFIG_DEBUG_SPI -- With CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE,
|
||||
# this will enable debug output from the PGA117 driver.
|
||||
#
|
||||
CONFIG_INPUT=n
|
||||
CONFIG_ADC=n
|
||||
CONFIG_SPI_OWNBUS=y
|
||||
CONFIG_DEBUG_SPI=n
|
||||
|
||||
CONFIG_INPUT_PGA11X=n
|
||||
CONFIG_ADC_PGA11X=n
|
||||
#CONFIG_PGA11X_SPIFREQUENCY
|
||||
CONFIG_PGA11X_DAISYCHAIN=n
|
||||
CONFIG_PGA11X_SPIMODE=1
|
||||
|
||||
@ -58,6 +58,12 @@ ifeq ($(CONFIG_ADC),y)
|
||||
|
||||
CSRCS += adc.c
|
||||
|
||||
# Amplifiers/multiplexers
|
||||
|
||||
ifeq ($(CONFIG_ADC_PGA11X),y)
|
||||
CSRCS += pga11x.c
|
||||
endif
|
||||
|
||||
# Include ADC device drivers
|
||||
|
||||
ifeq ($(CONFIG_ADC_ADS125X),y)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* drivers/input/pga11x.c
|
||||
* drivers/analog/pga11x.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -48,9 +48,9 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/input/pga11x.h>
|
||||
#include <nuttx/analog/pga11x.h>
|
||||
|
||||
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_PGA11X)
|
||||
#if defined(CONFIG_ADC) && defined(CONFIG_ADC_PGA11X)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -576,5 +576,5 @@ int pga11x_enable(PGA11X_HANDLE handle)
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INPUT && CONFIG_INPUT_PGA11X */
|
||||
#endif /* CONFIG_ADC && CONFIG_ADC_PGA11X */
|
||||
|
||||
@ -63,10 +63,6 @@ ifneq ($(CONFIG_INPUT_STMPE811_TEMP_DISABLE),y)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INPUT_PGA11X),y)
|
||||
CSRCS += pga11x.c
|
||||
endif
|
||||
|
||||
# Include input device driver build support
|
||||
|
||||
DEPPATH += --dep-path input
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/input/pga11x.h
|
||||
* include/nuttx/analog/pga11x.h
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -38,8 +38,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_INPUT_PGA11X_H
|
||||
#define __INCLUDE_NUTTX_INPUT_PGA11X_H
|
||||
#ifndef __INCLUDE_NUTTX_ANALOG_PGA11X_H
|
||||
#define __INCLUDE_NUTTX_ANALOG_PGA11X_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@ -48,16 +48,17 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/spi.h>
|
||||
|
||||
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_PGA11X)
|
||||
#if defined(CONFIG_ADC) && defined(CONFIG_ADC_PGA11X)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
/* Prerequisites: CONFIG_INPUT=y
|
||||
/* Prerequisites:
|
||||
* CONFIG_ADC=y is needed to enable support for analog input devices
|
||||
*
|
||||
* CONFIG_INPUT_PGA11X
|
||||
* Enables support for the PGA11X driver (Needs CONFIG_INPUT)
|
||||
* CONFIG_ADC_PGA11X
|
||||
* Enables support for the PGA11X driver (Needs CONFIG_ADC)
|
||||
* CONFIG_PGA11X_SPIFREQUENCY
|
||||
* SPI frequency. Default 1MHz
|
||||
* CONFIG_PGA11X_DAISYCHAIN
|
||||
@ -71,7 +72,11 @@
|
||||
* device will require a customized SPI interface to distinguish them
|
||||
* When SPI_SELECT is called with devid=SPIDEV_MUX.
|
||||
*
|
||||
* Other settings that effect the driver: CONFIG_SPI_OWNBUS, CONFIG_DEBUG_SPI.
|
||||
* Other settings that effect the driver:
|
||||
* CONFIG_SPI_OWNBUS -- If the PGA117 is enabled, this must be set to 'y'
|
||||
* if the PGA117 is the only device on the SPI bus;
|
||||
* CONFIG_DEBUG_SPI -- With CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE,
|
||||
* this will enable debug output from the PGA117 driver.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_PGA11X_SPIFREQUENCY
|
||||
@ -288,5 +293,5 @@ EXTERN int pga11x_enable(PGA11X_HANDLE handle);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_INPUT && CONFIG_INPUT_PGA11X */
|
||||
#endif /* __INCLUDE_NUTTX_INPUT_PGA11X_H */
|
||||
#endif /* CONFIG_ADC && CONFIG_ADC_PGA11X */
|
||||
#endif /* __INCLUDE_NUTTX_ANALOG_PGA11X_H */
|
||||
Loading…
x
Reference in New Issue
Block a user