sdspi: support crc16_be for esp32s2

This commit is contained in:
Michael (XIAO Xufeng)
2020-02-11 16:36:22 +08:00
parent c1d0daf36d
commit 278634dcbd
4 changed files with 55 additions and 48 deletions

View File

@@ -17,6 +17,10 @@
#include <stdint.h>
#define ESP_ROM_HAS_CRC8LE 1
#define ESP_ROM_HAS_CRC16LE 1
#define ESP_ROM_HAS_CRC32LE 1
#ifdef __cplusplus
extern "C" {
#endif
@@ -50,19 +54,6 @@ extern "C" {
*/
uint32_t crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief Crc32 value that is in big endian.
*
* @param uint32_t crc : init crc value, use 0 at the first use.
*
* @param uint8_t const *buf : buffer to start calculate crc.
*
* @param uint32_t len : buffer length in byte.
*
* @return None
*/
uint32_t crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief Crc16 value that is in little endian.
*
@@ -76,19 +67,6 @@ uint32_t crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len);
*/
uint16_t crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief Crc16 value that is in big endian.
*
* @param uint16_t crc : init crc value, use 0 at the first use.
*
* @param uint8_t const *buf : buffer to start calculate crc.
*
* @param uint32_t len : buffer length in byte.
*
* @return None
*/
uint16_t crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief Crc8 value that is in little endian.
*
@@ -102,19 +80,6 @@ uint16_t crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len);
*/
uint8_t crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief Crc8 value that is in big endian.
*
* @param uint32_t crc : init crc value, use 0 at the first use.
*
* @param uint8_t const *buf : buffer to start calculate crc.
*
* @param uint32_t len : buffer length in byte.
*
* @return None
*/
uint8_t crc8_be(uint8_t crc, uint8_t const *buf, uint32_t len);
/**
* @}
*/