Compare commits
No commits in common. "903c1390973e673abcb3f83096da3e9dce3a2f69" and "fb2d609dbc251c9326ffe5c14a942f51ae42094d" have entirely different histories.
903c139097
...
fb2d609dbc
@ -1,31 +1,11 @@
|
|||||||
#include "system/task_crc.h"
|
#include "system/task_crc.h"
|
||||||
#include "system/data_channel.h"
|
#include "system/data_channel.h"
|
||||||
#include "system/float_word.h"
|
#include "system/float_word.h"
|
||||||
#include <zlib.h> /* c-library for crc32() */
|
|
||||||
|
|
||||||
int task_crc_run( void * task ) {
|
int task_crc_run( void * task ) {
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
crc_config * crc = ( crc_config * ) task;
|
|
||||||
uint32_t data_channel_base = crc->base.sink;
|
|
||||||
data_channel_clear( data_channel_base);
|
|
||||||
|
|
||||||
float_word crc_res;
|
|
||||||
float_word crc_input;
|
|
||||||
|
|
||||||
for ( uint32_t i = 0; i < DATA_CHANNEL_DEPTH; ++i )
|
|
||||||
{
|
|
||||||
data_channel_read(crc->base.sources[0], &crc_input.value);
|
|
||||||
|
|
||||||
crc_res.value = crc32(0, (const void*)crc_input.value, sizeof(crc_input.value));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
data_channel_write( data_channel_base, crc_res.word );
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user