This commit is contained in:
r.koeppe
2024-05-14 02:14:13 +02:00
parent 0052d3984b
commit 2d22ccd2d6
1423 changed files with 354055 additions and 7 deletions

View File

@ -0,0 +1,34 @@
#ifndef VNERRDET_H_INCLUDED
#define VNERRDET_H_INCLUDED
/** \brief Error-detection capabilities. */
#include "vn/enum.h"
#include "vn/int.h"
#include "vn/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \brief Computes the 8-bit XOR checksum of the provided data.
*
* \param[in] data Pointer to the start of data to perform the checksum of.
* \param[in] length The number of bytes to include in the checksum.
* \return The computed checksum.
*/
uint8_t VnChecksum8_compute(char const *data, size_t length);
/** \brief Computes the 16-bit CRC16-CCITT of the provided data.
*
* \param[in] data Pointer to the start of data to perform the CRC of.
* \param[in] length The number of bytes to include in the CRC.
* \return The computed CRC.
*/
uint16_t VnCrc16_compute(char const *data, size_t length);
#ifdef __cplusplus
}
#endif
#endif