source: svn/newcon3bcm2_21bu/dst/dhl/src/test/CRCTest.c

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 852 bytes
Line 
1
2#include "DHL_OSAL.h"
3#include "DHL_UTL.h"
4
5void CRC_Test(void)
6{
7        UINT8 pat1[] = {
8                0x00, 0xB0, 0x25, 0x10, 0x04, 0xC5, 0x00, 0x00, 0x00, 0x00, 
9                0xE0, 0x10, 0x10, 0x44, 0xF0, 0x44, 0x10, 0x84, 0xF0, 0x84, 
10                0x10, 0xFF, 0xF0, 0xFF, 0x11, 0x3F, 0xF1, 0x3F, 0x11, 0x7F, 
11                0xF1, 0x7F, 0x12, 0x3F, 0xF2, 0x3F, 0x17, 0x68, 0xA1, 0xAC};
12        UINT8 pat2[] = {
13                0x00, 0xB0, 0x0D, 0x00, 0x02, 0xC1, 0x00, 0x00, 0x00, 0x01,
14                0xE0, 0xA0, 0x27, 0x2D, 0xAC, 0xF1};
15               
16        int len_pat1 = 40;
17        int len_pat2 = 16;
18
19        UINT32 crc1 = DHL_UTL_CalcCRC32(DHL_CRC_START, pat1, len_pat1-4);
20        UINT32 crc2 = DHL_UTL_CalcCRC32(DHL_CRC_START, pat2, len_pat2-4);
21       
22        DHL_OS_Printf("calculated crc of pat1 is 0x%x and extracted is 0x%x\n\n", crc1, 0x1768A1AC);
23        DHL_OS_Printf("calculated crc of pat2 is 0x%x and extracted is 0x%x\n\n", crc2, 0x272DACF1);
24
25}
Note: See TracBrowser for help on using the repository browser.