From 14ad651f01e88242f0771fd027ca632483bb7adb Mon Sep 17 00:00:00 2001 From: konstantin Date: Thu, 19 Nov 2026 09:34:44 +0100 Subject: [PATCH] =?UTF-8?q?=C3=84nderungen=20an=20add.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- software/signal_processing/add.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/software/signal_processing/add.c b/software/signal_processing/add.c index c0be7d1..12459a5 100644 --- a/software/signal_processing/add.c +++ b/software/signal_processing/add.c @@ -4,7 +4,28 @@ int task_add_run( void * task ) { - // TODO + float_word a; + + float_word b; + + float_word c; + + task_base_config * config = (task_base_config *) task; + + for (uint32_t i= 0; i < DATA_CHANNEL_DEPTH; ++i) + { + + data_channel_read(config->sources[0], &a.word); + data_channel_read(config->sources[1], &b.word); + + c.word = a.value + b.value; + + data_channel_write(config->sink, c.word); + + } + + + return 0; }