![]() |
![]() |
PASAHO Checksum/CRC Command Macros | |
| #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_CRCSIZE(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 8, 8) |
| #define | PASAHO_CHKCRC_SET_START(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 8) |
| #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 | PASAHO_CHKCRC_SET_INITVAL32(x, v) (x)->word2 = (v) |
| #define PASAHO_CHKCRC_SET_CRCSIZE | ( | x, | |
| v | |||
| ) | PASAHO_SET_BITFIELD((x)->word0, (v), 8, 8) |
Sets the size of the crc in bytes (PASS Gen2 only)
| #define PASAHO_CHKCRC_SET_CTRL | ( | x, | |
| v | |||
| ) | PASAHO_SET_BITFIELD((x)->word0, (v), 16, 4) |
Sets the optional flags of the CRC/Checksum command
| #define PASAHO_CHKCRC_SET_INITVAL | ( | x, | |
| v | |||
| ) | PASAHO_SET_BITFIELD((x)->word2, (v), 16, 16) |
Sets the initial value of the 16-bit checksum
| #define PASAHO_CHKCRC_SET_INITVAL32 | ( | x, | |
| v | |||
| ) | (x)->word2 = (v) |
Sets the initial value of the 32-bit crc (PASS Gen2 only)
| #define PASAHO_CHKCRC_SET_LEN | ( | x, | |
| v | |||
| ) | PASAHO_SET_BITFIELD((x)->word1, (v), 16, 16) |
Sets the length of the checksum/crc
| #define PASAHO_CHKCRC_SET_NEG0 | ( | x, | |
| v | |||
| ) | 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, | |
| v | |||
| ) | 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, | |
| v | |||
| ) | PASAHO_SET_BITFIELD((x)->word0, (v), 0, 8) |
Sets the start offset of the checksum/crc