nuttx/drivers/i2s/Kconfig
Gregory Nutt 21aef0dd68 drivers/*/Kconfig: Consolidate driver Kconfig Files.
This commit does two things:

1. First, it reorganizes the driver Kconfig files so that each is self contained.  Before, a part of the driver configuration was in drivers/Kconfig and the rest was in in drivers/xyz/Konfig.  Now, all of the driver configuration is consolitated in the latter.

2. Second, this commit correct numerous serious errors introduced in a previous reorganization of the driver Kconfig files.  This was first noted by Nicholas Chin in PR270 for the case of the drivers/i2c/Kconfig but some examination indicates that the error was introduced into several other Kconfig files as well.

The nature of the introduced error was basically this:

- Nothing must intervene between the menuconfig selection and the following conditional configuration otpions.
- A previous PR erroneously introduced unconditional options between the menuconfig and the following confditional logic, thus corrupting the driver menus.

This error was easy to make because the driver Kconfig files were not well modularized.  Making them fully self-contained should eliminate this kind of error in the future.
2020-02-15 15:19:11 +01:00

48 lines
1.4 KiB
Plaintext

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menuconfig I2S
bool "I2S Driver Support"
default n
---help---
This selection enables selection of common I2S options. This option
should be enabled by all platforms that support I2S interfaces.
See include/nuttx/audio/i2s.h for further I2S driver information.
if I2S
config AUDIO_I2SCHAR
bool "I2S character driver (for testing only)"
default n
---help---
This selection enables a simple character driver that supports I2S
transfers via a read() and write(). The intent of this driver is to
support I2S testing. It is not an audio driver but does conform to
some of the buffer management heuristics of an audio driver. It is
not suitable for use in any real driver application in its current
form.
if AUDIO_I2SCHAR
config AUDIO_I2SCHAR_RXTIMEOUT
int "RX timeout"
default 0
---help---
This is a fixed timeout value that will be used for all receiver
transfers. This is in units of system clock ticks (configurable).
The special value of zero disables RX timeouts. Default: 0
config AUDIO_I2SCHAR_TXTIMEOUT
int "TX timeout"
default 0
---help---
This is a fixed timeout value that will be used for all transmitter
transfers. This is in units of system clock ticks (configurable).
The special value of zero disables RX timeouts. Default: 0
endif # AUDIO_I2SCHAR
endif # I2S