Skip to content

Commit

Permalink
tests: drivers: dac channel structure has a buffered parameter boolean
Browse files Browse the repository at this point in the history
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 zephyrproject-rtos/zephyr#57730
Also changed for the samples/drivers/dac

(cherry picked from commit c908aea)

Original-Signed-off-by: Francois Ramu <[email protected]>
GitOrigin-RevId: c908aea
Change-Id: I282794e70ca141a90b802a0ba23a4265107ca40f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4603286
Tested-by: CopyBot Service Account <[email protected]>
Reviewed-by: Al Semjonovs <[email protected]>
Commit-Queue: Al Semjonovs <[email protected]>
Tested-by: Al Semjonovs <[email protected]>
  • Loading branch information
FRASTM authored and Chromeos LUCI committed Jun 9, 2023
1 parent 01da023 commit cb0637c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion samples/drivers/dac/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/drivers/dac/dac_api/src/test_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/drivers/dac/dac_loopback/src/test_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit cb0637c

Please sign in to comment.