From a79de4026365a0968d5cb19f3cab0b55c5d0674c Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 11 Dec 2020 09:23:33 +0100 Subject: [PATCH] tests/driver_dac_dds: Parametrize configured DAC device The set default is good enough for single-channel board, but whenever DAC_DDS_CHAN is not zero (or even when a board has more), this may need changing. --- tests/driver_dac_dds/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/driver_dac_dds/main.c b/tests/driver_dac_dds/main.c index a48d3a6fc0..5b5ca95297 100644 --- a/tests/driver_dac_dds/main.c +++ b/tests/driver_dac_dds/main.c @@ -39,6 +39,10 @@ #define DAC_DDS_CHAN 0 #endif +#ifndef DAC_DDS_DAC +#define DAC_DDS_DAC DAC_DDS_PARAM_DAC +#endif + #ifndef ENABLE_GREETING #define ENABLE_GREETING 1 #endif @@ -310,7 +314,7 @@ static const shell_command_t shell_commands[] = { int main(void) { - dac_init(DAC_DDS_PARAM_DAC); + dac_init(DAC_DDS_DAC); _dac_init(); /* start the shell */