blob: 41ff742d9a2162f3fdbde26dc8dbf8f993e796ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* Copyright 2020 Daniel Friesel
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
#include "driver/uptime.h"
#include "driver/counter.h"
#include "lib/inflate.h"
#include "deflate_data.cc"
unsigned char deflate_output[1024];
int main(void)
{
arch.setup();
gpio.setup();
kout.setup();
for (uint8_t i = 0; i < 5; i++) {
counter.start();
int16_t ret = inflate_zlib((unsigned char*)inflate_input, inflate_input_size, deflate_output, sizeof(deflate_output));
counter.stop();
kout << "inflate returned " << ret << endl;
kout << "Output: " << (char*)deflate_output << endl;
kout << "took " << counter.value << "/" << counter.overflow << " cycles" << endl;
}
arch.idle();
return 0;
}
|