From c908aead776d19a9a60abfe2a1b772fd73ff467b Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Wed, 7 Jun 2023 09:31:44 +0200 Subject: [PATCH] tests: drivers: dac channel structure has a buffered parameter boolean Add the '.buffered' field to the dac_channel_cfg structure when testing the DAC. This boolean parameter is initialised to 'true' to PASS the test. It follows the https://github.com/zephyrproject-rtos/zephyr/pull/57730 Also changed for the samples/drivers/dac Signed-off-by: Francois Ramu --- samples/drivers/dac/src/main.c | 3 ++- tests/drivers/dac/dac_api/src/test_dac.c | 3 ++- tests/drivers/dac/dac_loopback/src/test_dac.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/samples/drivers/dac/src/main.c b/samples/drivers/dac/src/main.c index 34eb1330b97..308777928b1 100644 --- a/samples/drivers/dac/src/main.c +++ b/samples/drivers/dac/src/main.c @@ -27,7 +27,8 @@ static const struct device *const dac_dev = DEVICE_DT_GET(DAC_NODE); static const struct dac_channel_cfg dac_ch_cfg = { .channel_id = DAC_CHANNEL_ID, - .resolution = DAC_RESOLUTION + .resolution = DAC_RESOLUTION, + .buffered = true }; int main(void) diff --git a/tests/drivers/dac/dac_api/src/test_dac.c b/tests/drivers/dac/dac_api/src/test_dac.c index 44277d7c7fb..ae03ee58264 100644 --- a/tests/drivers/dac/dac_api/src/test_dac.c +++ b/tests/drivers/dac/dac_api/src/test_dac.c @@ -87,7 +87,8 @@ static const struct dac_channel_cfg dac_ch_cfg = { .channel_id = DAC_CHANNEL_ID, - .resolution = DAC_RESOLUTION + .resolution = DAC_RESOLUTION, + .buffered = true }; const struct device *get_dac_device(void) diff --git a/tests/drivers/dac/dac_loopback/src/test_dac.c b/tests/drivers/dac/dac_loopback/src/test_dac.c index 122218c3645..13b53180e5d 100644 --- a/tests/drivers/dac/dac_loopback/src/test_dac.c +++ b/tests/drivers/dac/dac_loopback/src/test_dac.c @@ -148,7 +148,8 @@ static const struct dac_channel_cfg dac_ch_cfg = { .channel_id = DAC_CHANNEL_ID, - .resolution = DAC_RESOLUTION + .resolution = DAC_RESOLUTION, + .buffered = true }; static const struct adc_channel_cfg adc_ch_cfg = {