Knight Rider PIO sample for teckBASIC, konashi.js
Dependencies: BLE_API_Native_IRC mbed
Fork of BLE_konashi_PIO_test by
crc16.h
00001 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is property of Nordic Semiconductor ASA. 00004 * Terms and conditions of usage are described in detail in NORDIC 00005 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 */ 00012 00013 /** @file 00014 * 00015 * @defgroup crc_compute CRC compute 00016 * @{ 00017 * @ingroup hci_transport 00018 * 00019 * @brief This module implements the CRC-16 calculation in the blocks. 00020 */ 00021 00022 #ifndef CRC16_H__ 00023 #define CRC16_H__ 00024 00025 #include <stdint.h> 00026 #include "nordic_global.h" 00027 00028 /**@brief Function for calculating CRC-16 in blocks. 00029 * 00030 * Feed each consecutive data block into this function, along with the current value of p_crc as 00031 * returned by the previous call of this function. The first call of this function should pass NULL 00032 * as the initial value of the crc in p_crc. 00033 * 00034 * @param[in] p_data The input data block for computation. 00035 * @param[in] size The size of the input data block in bytes. 00036 * @param[in] p_crc The previous calculated CRC-16 value or NULL if first call. 00037 * 00038 * @return The updated CRC-16 value, based on the input supplied. 00039 */ 00040 uint16_t crc16_compute(const uint8_t * p_data, uint32_t size, const uint16_t * p_crc); 00041 00042 #endif // CRC16_H__ 00043 00044 /** @} */
Generated on Tue Jul 12 2022 16:55:06 by 1.7.2