diff --git a/drivers/dac/Kconfig.mcux b/drivers/dac/Kconfig.mcux index e824391838..7a76c6eb13 100644 --- a/drivers/dac/Kconfig.mcux +++ b/drivers/dac/Kconfig.mcux @@ -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. diff --git a/drivers/dac/dac_mcux_dac32.c b/drivers/dac/dac_mcux_dac32.c index 14818ae397..424872c1fd 100644 --- a/drivers/dac/dac_mcux_dac32.c +++ b/drivers/dac/dac_mcux_dac32.c @@ -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;