OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [peripheral/] [crc32.c] - Diff between revs 347 and 418

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 347 Rev 418
Line 53... Line 53...
        *value = 0xFFFFFFFF;
        *value = 0xFFFFFFFF;
}
}
 
 
void crc32_feed_bytes( unsigned long *value, const void *buf, unsigned len )
void crc32_feed_bytes( unsigned long *value, const void *buf, unsigned len )
{
{
        const unsigned char *p = (const unsigned char *)buf;
        const unsigned char *p;
 
 
        for ( p = (const unsigned char *)buf; len > 0; ++ p, -- len )
        for ( p = (const unsigned char *)buf; len > 0; ++ p, -- len )
                *value = (*value >> 8) ^ crc32_table[(*value ^ *p) & 0xFF];
                *value = (*value >> 8) ^ crc32_table[(*value ^ *p) & 0xFF];
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.