BALTECH Docs |
C API for BALTECH SDK
|
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.
[in] | protocol | used to execute the command |
[in] | Adr | Address of data to read. |
[in] | Len | Number of Bytes to read (0x01 - 0x20). |
[in] | CRCAdr | Address of CRC checksum for verification of read data. |
[out] | DataAdr | Address of read data. |
[out] | Data | Read data. |
[out] | Data_len | |
[in] | mempool | is 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 |