#include <string.h>
#include "nessie_stream_test.h"
#include "nessie_common.h"
-#include "uart.h"
+#include "memxor.h"
nessie_stream_ctx_t nessie_stream_ctx;
#define BLOCKSIZE_B 64
-static
-void memxor(void* dest, void* src, uint8_t length){
- while(length--){
- *((uint8_t*)dest) ^= *((uint8_t*)src);
- dest = (uint8_t*)dest +1;
- src = (uint8_t*)src +1;
- }
-}
-
static
void nessie_gen_block(void* ctx, uint8_t* block){
for(i=0; i<((65472-0)/BLOCKSIZE_B-1); ++i){
nessie_gen_block(ctx, buffer);
memxor(xorbuffer, buffer, BLOCKSIZE_B);
+ NESSIE_SEND_ALIVE_A(i);
}
nessie_gen_block(ctx, buffer);
for(i=0; i<((131008-65536)/BLOCKSIZE_B-1); ++i){
nessie_gen_block(ctx, buffer);
memxor(xorbuffer, buffer, BLOCKSIZE_B);
+ NESSIE_SEND_ALIVE_A(i);
}
nessie_gen_block(ctx, buffer);