Browse Source

Task4 software add.c

master
brandlfl78731 1 week ago
parent
commit
b1adcc892a
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      software/signal_processing/add.c

+ 12
- 0
software/signal_processing/add.c View File

int task_add_run( void * task ) { int task_add_run( void * task ) {


// TODO // TODO
add_config * config = ( add_config * ) task;

// Nachfolgende Antworten lesen..
for ( uint32_t i = 0; i < DATA_CHANNEL_DEPTH; i++) {
float a;
data_channel_read( config->sources[ 0 ], ( uint32_t * ) & a );
float b;
data_channel_read( config->sources[ 1 ], ( uint32_t * ) & b );
float_word c;
c.value = a + b;
data_channel_write( config->sink, c.word );
}


return 0; return 0;
} }

Loading…
Cancel
Save