Skip to content

Commit

Permalink
crc: rename checksum to CRC
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegHahm committed Feb 4, 2016
1 parent 6823b47 commit 3f64588
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions sys/checksum/crc16_ccitt.c → sys/crc/crc16_ccitt.c
Expand Up @@ -7,7 +7,7 @@
*/

/**
* @ingroup sys_checksum_crc16_ccitt
* @ingroup sys_crc_crc16_ccitt
* @{
*
* @file
Expand All @@ -21,7 +21,7 @@
#include <stdint.h>
#include <stdlib.h>

#include "checksum/crc16_ccitt.h"
#include "crc/crc16_ccitt.h"

static const uint16_t _crc16_lookuptable[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
Expand Down
4 changes: 2 additions & 2 deletions sys/checksum/doc.txt → sys/crc/doc.txt
Expand Up @@ -7,7 +7,7 @@
*/

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

/**
* @defgroup sys_checksum_crc16_ccitt CRC16-CCITT
* @ingroup sys_checksum
* @defgroup sys_crc_crc16_ccitt CRC16-CCITT
* @ingroup sys_crc
*
* @brief CRC16-CCITT checksum algorithm
* @details This implementation of CRC16 is based on the CCITT
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/tests-checksum/Makefile.include

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions tests/unittests/tests-crc/Makefile.include
@@ -0,0 +1 @@
USEMODULE += crc
Expand Up @@ -10,9 +10,9 @@

#include "embUnit/embUnit.h"

#include "checksum/crc16_ccitt.h"
#include "crc/crc16_ccitt.h"

#include "tests-checksum.h"
#include "tests-crc.h"

static int calc_and_compare_crc_with_update(const unsigned char *buf,
size_t len, size_t split, uint16_t expected)
Expand All @@ -32,7 +32,7 @@ static int calc_and_compare_crc(const unsigned char *buf, size_t len,
return result == expected;
}

static void test_checksum_crc16_ccitt_sequence(void)
static void test_crc_crc16_ccitt_sequence(void)
{
/* Reference values according to
* http://srecord.sourceforge.net/crc16-ccitt.html */
Expand Down Expand Up @@ -85,13 +85,13 @@ static void test_checksum_crc16_ccitt_sequence(void)
}
}

Test *tests_checksum_crc16_ccitt_tests(void)
Test *tests_crc_crc16_ccitt_tests(void)
{
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(test_checksum_crc16_ccitt_sequence),
new_TestFixture(test_crc_crc16_ccitt_sequence),
};

EMB_UNIT_TESTCALLER(checksum_crc16_ccitt_tests, NULL, NULL, fixtures);
EMB_UNIT_TESTCALLER(crc_crc16_ccitt_tests, NULL, NULL, fixtures);

return (Test *)&checksum_crc16_ccitt_tests;
return (Test *)&crc_crc16_ccitt_tests;
}
Expand Up @@ -6,9 +6,9 @@
* directory for more details.
*/

#include "tests-checksum.h"
#include "tests-crc.h"

void tests_checksum(void)
void tests_crc(void)
{
TESTS_RUN(tests_checksum_crc16_ccitt_tests());
TESTS_RUN(tests_crc_crc16_ccitt_tests());
}
Expand Up @@ -11,7 +11,7 @@
* @{
*
* @file
* @brief Unittests for the ``checksum`` module
* @brief Unittests for the ``crc`` module
*
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
*/
Expand All @@ -28,14 +28,14 @@ extern "C" {
/**
* @brief The entry point of this test suite.
*/
void tests_checksum(void);
void tests_crc(void);

/**
* @brief Generates tests for checksum/crc16_ccitt.h
* @brief Generates tests for crc/crc16_ccitt.h
*
* @return embUnit tests if successful, NULL if not.
*/
Test *tests_checksum_crc16_ccitt_tests(void);
Test *tests_crc_crc16_ccitt_tests(void);

#ifdef __cplusplus
}
Expand Down

0 comments on commit 3f64588

Please sign in to comment.