mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 05:23:06 +00:00
4d6b170769
* Fixing compiler warnings with -Wextra * More warnings suppression, WIP * Even more warning fixes * Added new lines at end of text files. * Padding fix * Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline * Fixes for Secplus v1 * -additional warnings * +-Wredundant-decls fixes * FuriHal: print stack overflow task name in console * FuriHal: add missing include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
35 lines
876 B
C
35 lines
876 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** Configure for CRC32 calculation
|
|
* @param synchronize enforce acquisition & release in multithreaded environment
|
|
*/
|
|
void furi_hal_crc_init(bool synchronize);
|
|
|
|
/** Blocking call to get control of CRC block. Mandatory while RTOS is running
|
|
* @param timeout time to wait for CRC to be available. Can be osWaitForever
|
|
* @return bool acquisition success
|
|
*/
|
|
bool furi_hal_crc_acquire(uint32_t timeout);
|
|
|
|
/** Reset current calculation state and release CRC block
|
|
*/
|
|
void furi_hal_crc_reset();
|
|
|
|
/** Process data block. Does not reset current state,
|
|
* allowing to process arbitrary data lengths
|
|
* @param data pointer to data
|
|
* @param length data length
|
|
* @return uint32_t CRC32 value
|
|
*/
|
|
uint32_t furi_hal_crc_feed(void* data, uint16_t length);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|