An194 – Cirrus Logic AN194 User Manual
Page 3

AN194
AN194REV1
3
}
/******************************************************************************
*
* CalculateHashIndex()
*
******************************************************************************/
BYTE CalculateHashIndex( BYTE *pMulticastAddr )
{
BYTE HashIndex;
BYTE AddrByte;
int Byte;
int Bit, j;
/* Prime the CRC */
for (j = 0; j < 32; j++ ) CRC[j] = 1;
/* For each of the six bytes of the multicast address */
for ( Byte=0; Byte<6; Byte++ )
{
/*
printf("\n%2.2x", *pMulticastAddr);
(void) getchar();
*/
AddrByte = *pMulticastAddr++;
/* For each bit of the byte */
for ( Bit=0; Bit<8; Bit++ )
{
updatecrc( (AddrByte >> Bit) & 1 );
}
}
/* Take the least significant six bits of the CRC and copy them */
/* to the HashIndex in reverse order. */
HashIndex = 0;
for( Bit=0,HashIndex=0; Bit<6; Bit++ )
{
HashIndex = (HashIndex << 1) + CRC[Bit];
- CobraNet (147 pages)
- CS4961xx (54 pages)
- CS150x (8 pages)
- CS1501 (16 pages)
- CS1601 (2 pages)
- CS1601 (16 pages)
- CS1610 (16 pages)
- CRD1610-8W (24 pages)
- CRD1611-8W (25 pages)
- CDB1610-8W (21 pages)
- CS1610A (18 pages)
- CDB1611-8W (21 pages)
- CDB1610A-8W (21 pages)
- CDB1611A-8W (21 pages)
- CRD1610A-8W (24 pages)
- CRD1611A-8W (25 pages)
- CS1615 (16 pages)
- AN403 (15 pages)
- AN401 (14 pages)
- AN400 (15 pages)
- AN375 (27 pages)
- AN376 (9 pages)
- CRD1615-8W (22 pages)
- CRD1616-8W (23 pages)
- AN402 (14 pages)
- AN404 (15 pages)
- CRD1615A-8W (21 pages)
- CS1615A (16 pages)
- CS1630 (56 pages)
- AN374 (35 pages)
- AN368 (80 pages)
- CRD1630-10W (24 pages)
- CRD1631-10W (25 pages)
- CS1680 (16 pages)
- AN405 (13 pages)
- AN379 (31 pages)
- CRD1680-7W (31 pages)
- AN335 (10 pages)
- AN334 (6 pages)
- AN312 (14 pages)
- AN Integrating CobraNet into Audio Products (16 pages)
- CobraNet Audio Routing Primer (9 pages)
- Bundle Assignments in CobraNet Systems (3 pages)
- CS2300-01 (3 pages)
- CS2000-CP (38 pages)