C API for BALTECH SDK

§ brp_Lg_ReadMIMCRC()

brp_errcode brp_Lg_ReadMIMCRC ( brp_protocol  protocol,
unsigned  Adr,
unsigned  Len,
unsigned  CRCAdr,
unsigned *  DataAdr,
brp_buf Data,
size_t *  Data_len,
brp_mempool mempool 
)

This command is similar to the brp_Lg_ReadMIM() command, except that a CRC checksum is calculated over the read Bytes and compared to the CRC checksum given in the CRCAdr parameter.

If these checksums differ, the BRP_Lg_ErrCrc status code will be returned. Depending on the value of the CRCCalc flag given as a parameter in the brp_Lg_Select() command, either 8-bit or 16-bit checksums will be used.

Parameters
[in]protocolused to execute the command
[in]AdrAddress of data to read.
[in]LenNumber of Bytes to read (0x01 - 0x20).
[in]CRCAdrAddress of CRC checksum for verification of read data.
[out]DataAdrAddress of read data.
[out]DataRead data.
[out]Data_len
[in]mempoolis used to store response data. Maybe NULL to use an internal mempool, in this case the data is only available until another command uses the internal mempool
Deprecated:
This command may be removed in future!