HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Function dealing with STM32 CRC peripheral. More...
#include "sarmfsw.h"
Typedefs | |
typedef enum eCRCFeedSize | eCRCFeedSize |
Enumerations | |
enum | eCRCFeedSize { CRC_Feed_BYTE = 1 , CRC_Feed_WORD = 2 , CRC_Feed_DWORD = 4 } |
CRC feed size. More... | |
Functions | |
FctERR | crc_compute (uint32_t *const crc, const eCRCFeedSize feed_size, const uint32_t start_addr, const uint32_t size) |
CRC computation. | |
FctERR | crc_check (const uint32_t crc_ref, const eCRCFeedSize feed_size, const uint32_t start_addr, const uint32_t size) |
CRC check. | |
Function dealing with STM32 CRC peripheral.
typedef enum eCRCFeedSize eCRCFeedSize |
enum eCRCFeedSize |
FctERR crc_check | ( | const uint32_t | crc_ref, |
const eCRCFeedSize | feed_size, | ||
const uint32_t | start_addr, | ||
const uint32_t | size ) |
CRC check.
[in] | crc_ref | - CRC to check against |
[in] | feed_size | - CRC peripheral feed size |
[in] | start_addr | - Start address of block to compute CRC |
[in] | size | - Size of block to compute CRC (in Bytes) |
ERROR_OK | - CRC consistent |
ERROR_CRC | - CRC inconsistent |
ERROR_VALUE | - feed_size is not a value of enum eCRCFeedSize |
ERROR_COMMON | - size is not int division with feed_size |
FctERR crc_compute | ( | uint32_t *const | crc, |
const eCRCFeedSize | feed_size, | ||
const uint32_t | start_addr, | ||
const uint32_t | size ) |
CRC computation.
[in,out] | crc | - Pointer to address to store CRC |
[in] | feed_size | - CRC peripheral feed size |
[in] | start_addr | - Start address of block to compute CRC |
[in] | size | - Size of block to compute CRC (in Bytes) |
ERROR_OK | - CRC computed |
ERROR_VALUE | - feed_size is not a value of enum eCRCFeedSize |
ERROR_COMMON | - size is not int division with feed_size |