lcx_crc.h Previous Back to the files list CRC (Cyclic Redundancy Check). More... Macros #define CX_CRC16_INIT 0xFFFF CRC16 initial value. More... Functions uint16_t cx_crc16 (const void *buffer, size_t len) Computes a 16-bit checksum value. More... uint16_t cx_crc16_update (uint16_t crc, const void *buffer, size_t len) Accumulates more data to CRC. More... Detailed Description CRC (Cyclic Redundancy Check). CRC-16 is a variant of CRC, an error-detecting code, with a 16-bit long check value. Macro Definition Documentation CX_CRC16_INIT #define CX_CRC16_INIT 0xFFFF CRC16 initial value. Function Documentation cx_crc16() uint16_t cx_crc16 ( const void * buffer, size_t len ) Computes a 16-bit checksum value. The 16-bit value is computed according to the CRC16 CCITT definition. Parameters [in]bufferThe buffer to compute the CRC over. [in]lenBytes length of the buffer. ReturnsCurrent CRC value. cx_crc16_update() uint16_t cx_crc16_update ( uint16_t crc, const void * buffer, size_t len ) Accumulates more data to CRC. Parameters [in]crcCRC value to be updated. [in]bufferThe buffer to compute the CRC over. [in]lenBytes length of the buffer. ReturnsUpdated CRC value. Previous Back to the files list Did you find this page helpful? How would you improve this page for developers? I am a developer. Contributors will be chosen randomly to receive rewards. Check this box to send your email and participate. Ledger collects your email address to send you rewards for your contribution to improve the Developer Portal documentation. Learn more about how we manage your data and your rights. By providing your email address, you consent that Ledger may contact you for rewards delivery purposes. If you are part of the randomly selected contributors, we will send you an email to ask for your physical address and if necessary, ask you for additional information on the suggestion you made. Your information will only be available to Ledger and will be retained for no longer than 90 days. It may be transferred to non-European countries that ensure an adequate level of protection or under the standard contractual clauses adopted by the EU Commission. Please note that you may withdraw your consent at any time, access your data and request their rectification or deletion. You may also request the limitation of the processing of your data. To exercise your rights or for any question on the processing of your data, please contact LEDGER’s Data Protection Officer here. If nevertheless you believe LEDGER did not adequately address your concerns and mishandled your data, you may lodge a complaint with the personal data protection authority of your country.