Browse Source

Revert "crc: rename checksum to CRC"

This reverts commit 3f645884a4.
pr/gpio
Ludwig Knüpfer 7 years ago
parent
commit
1fedd456ce
  1. 0
      sys/checksum/Makefile
  2. 4
      sys/checksum/crc16_ccitt.c
  3. 4
      sys/checksum/doc.txt
  4. 4
      sys/include/checksum/crc16_ccitt.h
  5. 0
      tests/unittests/tests-checksum/Makefile
  6. 1
      tests/unittests/tests-checksum/Makefile.include
  7. 14
      tests/unittests/tests-checksum/tests-checksum-crc16-ccitt.c
  8. 6
      tests/unittests/tests-checksum/tests-checksum.c
  9. 8
      tests/unittests/tests-checksum/tests-checksum.h
  10. 1
      tests/unittests/tests-crc/Makefile.include

0
sys/crc/Makefile → sys/checksum/Makefile

4
sys/crc/crc16_ccitt.c → sys/checksum/crc16_ccitt.c

@ -7,7 +7,7 @@
*/
/**
* @ingroup sys_crc_crc16_ccitt
* @ingroup sys_checksum_crc16_ccitt
* @{
*
* @file
@ -21,7 +21,7 @@
#include <stdint.h>
#include <stdlib.h>
#include "crc/crc16_ccitt.h"
#include "checksum/crc16_ccitt.h"
static const uint16_t _crc16_lookuptable[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,

4
sys/crc/doc.txt → sys/checksum/doc.txt

@ -7,7 +7,7 @@
*/
/**
* @defgroup sys_crc CRC Cyclic redundancy checks
* @defgroup sys_checksum Checksum
* @ingroup sys
* @brief CRC hashing functions
* @brief Checksum function libraries
*/

4
sys/include/crc/crc16_ccitt.h → sys/include/checksum/crc16_ccitt.h

@ -7,8 +7,8 @@
*/
/**
* @defgroup sys_crc_crc16_ccitt CRC16-CCITT
* @ingroup sys_crc
* @defgroup sys_checksum_crc16_ccitt CRC16-CCITT
* @ingroup sys_checksum
*
* @brief CRC16-CCITT checksum algorithm
* @details This implementation of CRC16 is based on the CCITT

0
tests/unittests/tests-crc/Makefile → tests/unittests/tests-checksum/Makefile

1
tests/unittests/tests-checksum/Makefile.include

@ -0,0 +1 @@
USEMODULE += checksum

14
tests/unittests/tests-crc/tests-crc-crc16-ccitt.c → tests/unittests/tests-checksum/tests-checksum-crc16-ccitt.c

@ -10,9 +10,9 @@
#include "embUnit/embUnit.h"
#include "crc/crc16_ccitt.h"
#include "checksum/crc16_ccitt.h"
#include "tests-crc.h"
#include "tests-checksum.h"
static int calc_and_compare_crc_with_update(const unsigned char *buf,
size_t len, size_t split, uint16_t expected)
@ -32,7 +32,7 @@ static int calc_and_compare_crc(const unsigned char *buf, size_t len,
return result == expected;
}
static void test_crc_crc16_ccitt_sequence(void)
static void test_checksum_crc16_ccitt_sequence(void)
{
/* Reference values according to
* http://srecord.sourceforge.net/crc16-ccitt.html */
@ -85,13 +85,13 @@ static void test_crc_crc16_ccitt_sequence(void)
}
}
Test *tests_crc_crc16_ccitt_tests(void)
Test *tests_checksum_crc16_ccitt_tests(void)
{
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(test_crc_crc16_ccitt_sequence),
new_TestFixture(test_checksum_crc16_ccitt_sequence),
};
EMB_UNIT_TESTCALLER(crc_crc16_ccitt_tests, NULL, NULL, fixtures);
EMB_UNIT_TESTCALLER(checksum_crc16_ccitt_tests, NULL, NULL, fixtures);
return (Test *)&crc_crc16_ccitt_tests;
return (Test *)&checksum_crc16_ccitt_tests;
}

6
tests/unittests/tests-crc/tests-crc.c → tests/unittests/tests-checksum/tests-checksum.c

@ -6,9 +6,9 @@
* directory for more details.
*/
#include "tests-crc.h"
#include "tests-checksum.h"
void tests_crc(void)
void tests_checksum(void)
{
TESTS_RUN(tests_crc_crc16_ccitt_tests());
TESTS_RUN(tests_checksum_crc16_ccitt_tests());
}

8
tests/unittests/tests-crc/tests-crc.h → tests/unittests/tests-checksum/tests-checksum.h

@ -11,7 +11,7 @@
* @{
*
* @file
* @brief Unittests for the ``crc`` module
* @brief Unittests for the ``checksum`` module
*
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
*/
@ -28,14 +28,14 @@ extern "C" {
/**
* @brief The entry point of this test suite.
*/
void tests_crc(void);
void tests_checksum(void);
/**
* @brief Generates tests for crc/crc16_ccitt.h
* @brief Generates tests for checksum/crc16_ccitt.h
*
* @return embUnit tests if successful, NULL if not.
*/
Test *tests_crc_crc16_ccitt_tests(void);
Test *tests_checksum_crc16_ccitt_tests(void);
#ifdef __cplusplus
}

1
tests/unittests/tests-crc/Makefile.include

@ -1 +0,0 @@
USEMODULE += crc
Loading…
Cancel
Save