lacteApp
C++17 service for Lacte hardware
Loading...
Searching...
No Matches
FastCrc Class Reference

#include <fast_crc.hpp>

Static Public Member Functions

static auto set_crc32_init_value (const uint32_t start) -> uint32_t
static auto fast_crc32 (uint32_t sum, const unsigned char *ptr, uint32_t len) -> uint32_t
static auto check_app_valid (const std::string_view file_path) -> bool
static auto check (char *base, const uint32_t size=DEFAULT_SIZE) -> bool

Static Public Attributes

static constexpr uint32_t POLY = 0x4C11DB7
static constexpr size_t DEFAULT_SIZE = 0x08080000 - 0x08008000
static constexpr size_t BIT_IN_BYTE = 8
static constexpr int UINT32_BIT_COUNT = 32
static constexpr int TOP_BYTE_SHIFT = 24
static constexpr uint32_t BYTE_MASK = 0xFF
static constexpr uint32_t ERASED_FLASH_MARKER = 0xFFFFFFFF

Detailed Description

Definition at line 15 of file fast_crc.hpp.

Member Function Documentation

◆ check()

auto FastCrc::check ( char * base,
const uint32_t size = DEFAULT_SIZE ) -> bool
inlinestatic

Definition at line 76 of file fast_crc.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_app_valid()

auto FastCrc::check_app_valid ( const std::string_view file_path) -> bool
inlinestatic

Definition at line 48 of file fast_crc.hpp.

Here is the call graph for this function:

◆ fast_crc32()

auto FastCrc::fast_crc32 ( uint32_t sum,
const unsigned char * ptr,
uint32_t len ) -> uint32_t
inlinestatic

Definition at line 39 of file fast_crc.hpp.

Here is the caller graph for this function:

◆ set_crc32_init_value()

auto FastCrc::set_crc32_init_value ( const uint32_t start) -> uint32_t
inlinestatic

Definition at line 23 of file fast_crc.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ BIT_IN_BYTE

size_t FastCrc::BIT_IN_BYTE = 8
staticconstexpr

Definition at line 19 of file fast_crc.hpp.

◆ BYTE_MASK

uint32_t FastCrc::BYTE_MASK = 0xFF
staticconstexpr

Definition at line 22 of file fast_crc.hpp.

◆ DEFAULT_SIZE

size_t FastCrc::DEFAULT_SIZE = 0x08080000 - 0x08008000
staticconstexpr

Definition at line 18 of file fast_crc.hpp.

◆ ERASED_FLASH_MARKER

uint32_t FastCrc::ERASED_FLASH_MARKER = 0xFFFFFFFF
staticconstexpr

Definition at line 74 of file fast_crc.hpp.

◆ POLY

uint32_t FastCrc::POLY = 0x4C11DB7
staticconstexpr

Definition at line 17 of file fast_crc.hpp.

◆ TOP_BYTE_SHIFT

int FastCrc::TOP_BYTE_SHIFT = 24
staticconstexpr

Definition at line 21 of file fast_crc.hpp.

◆ UINT32_BIT_COUNT

int FastCrc::UINT32_BIT_COUNT = 32
staticconstexpr

Definition at line 20 of file fast_crc.hpp.


The documentation for this class was generated from the following file: