diff options
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/buflib.h | 6 | ||||
-rw-r--r-- | firmware/include/core_alloc.h | 3 | ||||
-rw-r--r-- | firmware/include/crc32.h | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h index 0b26c04bcd..171ab5bcd7 100644 --- a/firmware/include/buflib.h +++ b/firmware/include/buflib.h | |||
@@ -40,6 +40,7 @@ union buflib_data | |||
40 | struct buflib_callbacks* ops; | 40 | struct buflib_callbacks* ops; |
41 | char* alloc; | 41 | char* alloc; |
42 | union buflib_data *handle; | 42 | union buflib_data *handle; |
43 | uint32_t crc; | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | struct buflib_context | 46 | struct buflib_context |
@@ -346,4 +347,9 @@ int buflib_get_num_blocks(struct buflib_context *ctx); | |||
346 | */ | 347 | */ |
347 | void buflib_print_block_at(struct buflib_context *ctx, int block_num, | 348 | void buflib_print_block_at(struct buflib_context *ctx, int block_num, |
348 | char* buf, size_t bufsize); | 349 | char* buf, size_t bufsize); |
350 | |||
351 | /** | ||
352 | * Check integrity of given buflib context | ||
353 | */ | ||
354 | void buflib_check_valid(struct buflib_context *ctx); | ||
349 | #endif | 355 | #endif |
diff --git a/firmware/include/core_alloc.h b/firmware/include/core_alloc.h index a100b7cc6c..095cb5da11 100644 --- a/firmware/include/core_alloc.h +++ b/firmware/include/core_alloc.h | |||
@@ -17,6 +17,9 @@ bool core_shrink(int handle, void* new_start, size_t new_size); | |||
17 | int core_free(int handle); | 17 | int core_free(int handle); |
18 | size_t core_available(void); | 18 | size_t core_available(void); |
19 | size_t core_allocatable(void); | 19 | size_t core_allocatable(void); |
20 | #ifdef DEBUG | ||
21 | void core_check_valid(void); | ||
22 | #endif | ||
20 | 23 | ||
21 | /* DO NOT ADD wrappers for buflib_buffer_out/in. They do not call | 24 | /* DO NOT ADD wrappers for buflib_buffer_out/in. They do not call |
22 | * the move callbacks and are therefore unsafe in the core */ | 25 | * the move callbacks and are therefore unsafe in the core */ |
diff --git a/firmware/include/crc32.h b/firmware/include/crc32.h index 034c3984ab..8e1f868988 100644 --- a/firmware/include/crc32.h +++ b/firmware/include/crc32.h | |||
@@ -18,10 +18,12 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include <stdint.h> | ||
22 | |||
21 | #ifndef _CRC32_H | 23 | #ifndef _CRC32_H |
22 | #define _CRC32_H | 24 | #define _CRC32_H |
23 | 25 | ||
24 | unsigned crc_32(const void *src, unsigned len, unsigned crc32); | 26 | uint32_t crc_32(const void *src, uint32_t len, uint32_t crc32); |
25 | 27 | ||
26 | #endif | 28 | #endif |
27 | 29 | ||