mirror of https://github.com/jeelabs/esp-link.git
parent
0cd1984fb7
commit
8c04617cb2
@ -1,10 +1,10 @@ |
||||
CFLAGS=-I../lib/heatshrink -I../user -I../include -std=gnu99
|
||||
|
||||
espfs.o: espfs.c ../user/espfs.c |
||||
|
||||
espfstest: main.o espfs.o heatshrink_decoder.o |
||||
$(CC) -o $@ $^
|
||||
|
||||
espfs.o: espfs.c ../user/espfs.c |
||||
|
||||
|
||||
clean: |
||||
rm -f *.o espfstest
|
||||
|
@ -0,0 +1,25 @@ |
||||
#ifndef HEATSHRINK_CONFIG_H |
||||
#define HEATSHRINK_CONFIG_H |
||||
|
||||
/* Should functionality assuming dynamic allocation be used? */ |
||||
#define HEATSHRINK_DYNAMIC_ALLOC 1 |
||||
|
||||
#if HEATSHRINK_DYNAMIC_ALLOC |
||||
/* Optional replacement of malloc/free */ |
||||
#define HEATSHRINK_MALLOC(SZ) os_malloc(SZ) |
||||
#define HEATSHRINK_FREE(P, SZ) os_free(P) |
||||
#else |
||||
/* Required parameters for static configuration */ |
||||
#define HEATSHRINK_STATIC_INPUT_BUFFER_SIZE 32 |
||||
#define HEATSHRINK_STATIC_WINDOW_BITS 8 |
||||
#define HEATSHRINK_STATIC_LOOKAHEAD_BITS 4 |
||||
#endif |
||||
|
||||
/* Turn on logging for debugging. */ |
||||
#define HEATSHRINK_DEBUGGING_LOGS 0 |
||||
|
||||
/* Use indexing for faster compression. (This requires additional space.) */ |
||||
#define HEATSHRINK_USE_INDEX 1 |
||||
|
||||
#endif |
||||
|
@ -0,0 +1,20 @@ |
||||
#include "httpdconfig.h" |
||||
#ifdef EFS_HEATSHRINK |
||||
//Stupid wrapper so we don't have to move c-files around
|
||||
//Also loads httpd-specific config.
|
||||
|
||||
#define _STDLIB_H_ |
||||
#define _STRING_H_ |
||||
#define _STDDEF_H |
||||
#define _STDINT_H |
||||
|
||||
#include "c_types.h" |
||||
#include "mem.h" |
||||
#include "osapi.h" |
||||
#include "heatshrink_config_httpd.h" |
||||
#define malloc(x) os_malloc(x) |
||||
#define memset(x,y,z) os_memset(x,y,z) |
||||
#define memcpy(x,y,z) os_memcpy(x,y,z) |
||||
#include "../lib/heatshrink/heatshrink_decoder.c" |
||||
|
||||
#endif |
Loading…
Reference in new issue