PASAHO Checksum/CRC Command Macros
[PA/SA/Host Macros]

PASAHO Checksum/CRC Command Macros

Macros used by the ASAHO Checksum/CRC Command



#define PASAHO_CHKCRC_SET_NEG0(x, v)   PASAHO_SET_BITFIELD((x)->word0, (v), 23, 1)
#define PASAHO_CHKCRC_SET_CTRL(x, v)   PASAHO_SET_BITFIELD((x)->word0, (v), 16, 4)
#define PASAHO_CHKCRC_SET_START(x, v)   PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16)
#define PASAHO_CHKCRC_SET_LEN(x, v)   PASAHO_SET_BITFIELD((x)->word1, (v), 16, 16)
#define PASAHO_CHKCRC_SET_RESULT_OFF(x, v)   PASAHO_SET_BITFIELD((x)->word1, (v), 0, 16)
#define PASAHO_CHKCRC_SET_INITVAL(x, v)   PASAHO_SET_BITFIELD((x)->word2, (v), 16, 16)

Define Documentation

#define PASAHO_CHKCRC_SET_CTRL ( x,
 )     PASAHO_SET_BITFIELD((x)->word0, (v), 16, 4)

Sets the optional flags of the CRC/Checksum command

#define PASAHO_CHKCRC_SET_INITVAL ( x,
 )     PASAHO_SET_BITFIELD((x)->word2, (v), 16, 16)

Sets the initial value of the checksum/crc

#define PASAHO_CHKCRC_SET_LEN ( x,
 )     PASAHO_SET_BITFIELD((x)->word1, (v), 16, 16)

Sets the length of the checksum/crc

#define PASAHO_CHKCRC_SET_NEG0 ( x,
 )     PASAHO_SET_BITFIELD((x)->word0, (v), 23, 1)

Sets the negative 0 flag - if set a checksum computed as 0 will be sent as 0xffff

#define PASAHO_CHKCRC_SET_RESULT_OFF ( x,
 )     PASAHO_SET_BITFIELD((x)->word1, (v), 0, 16)

Sets the offset to where to paste the checksum/crc into the packet

#define PASAHO_CHKCRC_SET_START ( x,
 )     PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16)

Sets the start offset of the checksum/crc


Copyright 2012, Texas Instruments Incorporated