drivers: dac: mcux_dac32: add Kconfig option for enabling test output

Add a Kconfig option for enabling the DAC test output. On the NXP
KE1xF the DAC test output is internally routed to ADCx SE23.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
Henrik Brix Andersen 2020-05-22 10:10:26 +02:00 committed by Anas Nashif
parent 69f0e3b15f
commit 6494ce2607
2 changed files with 9 additions and 0 deletions

View file

@ -15,3 +15,9 @@ config DAC_MCUX_DAC32
depends on HAS_MCUX_DAC32
help
Enable the driver for the NXP Kinetis MCUX DAC32.
config DAC_MCUX_DAC32_TESTOUT
bool "Enable DAC test output"
depends on DAC_MCUX_DAC32
help
Enable the DAC test output.

View file

@ -49,6 +49,9 @@ static int mcux_dac32_channel_setup(struct device *dev,
DAC32_Init(config->base, &dac32_config);
DAC32_EnableBufferOutput(config->base, config->buffered);
DAC32_EnableTestOutput(config->base,
IS_ENABLED(CONFIG_DAC_MCUX_DAC32_TESTOUT));
data->configured = true;
return 0;