An194 – Cirrus Logic AN194 User Manual
Page 2
AN194
2
AN194REV1
#define BYTE unsigned char
#define WORD int
#define DWORD int long
#include
BYTE CalculateHashIndex(BYTE *pMulticastAddr);
void main();
void updatecrc( int bit );
int crc_poly[] = {1,1,1,0, 1,1,0,1,
1,0,1,1, 1,0,0,0,
1,0,0,0, 0,0,1,1,
0,0,1,0, 0,0,0,0
},
CRC[33];
void main ()
{
BYTE hash_index;
BYTE multicastaddr[5];
/* just a made up address
0x4d in byte 0 should hash to bit 63
of hash filter.
Changing the first byte to 0x85 will
hash to bit 0 of the hash filter
*/
multicastaddr[0] = 0x4d;
multicastaddr[1] = 0x00;
multicastaddr[2] = 0x00;
multicastaddr[3] = 0x00;
multicastaddr[4] = 0x00;
multicastaddr[5] = 0x00;
hash_index = CalculateHashIndex( multicastaddr );
printf("%d\n",hash_index);
(void) getchar();
See also other documents in the category Cirrus Logic Hardware:
- 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)