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; }