host/btle-tools/src/btle_rx.c
/**
 * Update the crc value with new data.
 *
 * \param crc      The current crc value.
 * \param data     Pointer to a buffer of \a data_len bytes.
 * \param data_len Number of bytes in the \a data buffer.
 * \return         The updated crc value.
 *****************************************************************************/
Update the crc value with new data.
\param crc      The current crc value.
\param data     Pointer to a buffer of \a data_len bytes.
\param data_len Number of bytes in the \a data buffer.
\return         The updated crc value.
Update the crc value with new data . \ param crc The current crc value . \ param data Pointer to a buffer of \ a data_len bytes . \ param data_len Number of bytes in the \ a data buffer . \ return The updated crc value .
uint_fast32_t crc_update(uint_fast32_t crc, const void *data, size_t data_len) {
    const unsigned char *d = (const unsigned char *)data;
    unsigned int tbl_idx;
    while (data_len--) {
            tbl_idx = (crc ^ *d) & 0xff;
            crc = (crc_table[tbl_idx] ^ (crc >> 8)) & 0xffffff;
        d++;
    }
    return crc & 0xffffff;
}
uint_fast32_t crc_update ( uint_fast32_t crc , const void * data , size_t data_len ) { const unsigned char * d = ( const unsigned char * ) data ; unsigned int tbl_idx ; while ( data_len -- ) { tbl_idx = ( crc ^ * d ) & 0xff ; crc = ( crc_table [ tbl_idx ] ^ ( crc >> 8 ) ) & 0xffffff ; d ++ ; } return crc & 0xffffff ; }
Update the crc value with new data.
Update the crc value with new data .