4.33 - SHTCRC [U12 Datasheet]
Checks the CRC on an SHT1X communication. Last byte of datarx is the CRC. Returns 0 if CRC is good, or SHT1X_CRC_ERROR_LJ if CRC is bad.
Declaration:
long SHTCRC ( long statusReg,
long numWrite,
long numRead,
unsigned char *datatx,
unsigned char *datarx)
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
- statusReg – Current value of the SHT1X status register.
- numWrite – Number of bytes that were written (0-4).
- numRead – Number of bytes that were read (1-4).
- *datatx – Array of 0-4 bytes that were sent.
- *datarx – Array of 1-4 bytes that were read.
ActiveX Function Differences:
Transmit and receive data arrays are each replaced with 4 individual parameters.
Declaration (ActiveX):
long SHTCRCX ( long statusReg,
long numWrite,
long numRead,
long datatx0,
long datatx1,
long datatx2,
long datatx3,
long datarx0,
long datarx1,
long datarx2,
long datarx3 )