Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BLE_Health_Thermometer2
Fork of nRF51822 by
Diff: nordic/nrf-sdk/app_common/crc16.h
- Revision:
- 45:3c4df37ed83e
- Parent:
- 37:c29c330d942c
--- a/nordic/nrf-sdk/app_common/crc16.h Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/app_common/crc16.h Wed Jul 16 10:53:07 2014 +0100
@@ -9,7 +9,7 @@
* the file.
*
*/
-
+
/** @file
*
* @defgroup crc_compute CRC compute
@@ -18,26 +18,35 @@
*
* @brief This module implements the CRC-16 calculation in the blocks.
*/
-
+
#ifndef CRC16_H__
#define CRC16_H__
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**@brief Function for calculating CRC-16 in blocks.
*
- * Feed each consecutive data block into this function, along with the current value of p_crc as
- * returned by the previous call of this function. The first call of this function should pass NULL
+ * Feed each consecutive data block into this function, along with the current value of p_crc as
+ * returned by the previous call of this function. The first call of this function should pass NULL
* as the initial value of the crc in p_crc.
*
* @param[in] p_data The input data block for computation.
* @param[in] size The size of the input data block in bytes.
- * @param[in] p_crc The previous calculated CRC-16 value or NULL if first call.
+ * @param[in] p_crc The previous calculated CRC-16 value or NULL if first call.
*
* @return The updated CRC-16 value, based on the input supplied.
*/
uint16_t crc16_compute(const uint8_t * p_data, uint32_t size, const uint16_t * p_crc);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif // CRC16_H__
-
+
/** @} */
