/** * \file * * * \brief CRC-CCITT table and support routines * * \author Francesco Sacchi */ #include "crc_ccitt.h" #include "crc.h" #include #include int crc_testSetup(void) { kdbg_init(); return 0; } int crc_testTearDown(void) { return 0; } int crc_testRun(void) { char vector[9] = "123456789"; uint16_t crc = CRC_CCITT_INIT_VAL; crc = crc_ccitt(crc, vector, sizeof(vector)); kprintf("crc_ccitt [%04X]\n", crc); ASSERT(crc == 0x6F91); crc = CRC16_INIT_VAL; crc = crc16(crc, vector, sizeof(vector)); kprintf("crc16 [%04X]\n", crc); ASSERT(crc == 0x31C3); return 0; } TEST_MAIN(crc);