Änderungen an add.c
This commit is contained in:
1 parent
95b1b3d0ca
commit
14ad651f01
1 file changed
+22
-1
@@ -4,7 +4,28 @@
|
|||||||
|
|
||||||
int task_add_run( void * task ) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user