mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Apr 20 11:15:08 2015 +0100
Revision:
517:29297862eac1
Parent:
501:36015dec7d16
Synchronized with git revision f14d0a93fa145ec9c507462dbd52bae300da59d3

Full URL: https://github.com/mbedmicro/mbed/commit/f14d0a93fa145ec9c507462dbd52bae300da59d3/

Part1 - upgrading to v8.0 of the Nordic SDK

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 303:78e31413b129 1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
mbed_official 303:78e31413b129 2 *
mbed_official 303:78e31413b129 3 * The information contained herein is property of Nordic Semiconductor ASA.
mbed_official 303:78e31413b129 4 * Terms and conditions of usage are described in detail in NORDIC
mbed_official 303:78e31413b129 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
mbed_official 303:78e31413b129 6 *
mbed_official 303:78e31413b129 7 * Licensees are granted free, non-transferable use of the information. NO
mbed_official 303:78e31413b129 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
mbed_official 303:78e31413b129 9 * the file.
mbed_official 303:78e31413b129 10 *
mbed_official 303:78e31413b129 11 */
mbed_official 517:29297862eac1 12
mbed_official 303:78e31413b129 13 /** @file
mbed_official 303:78e31413b129 14 *
mbed_official 303:78e31413b129 15 * @defgroup crc_compute CRC compute
mbed_official 303:78e31413b129 16 * @{
mbed_official 303:78e31413b129 17 * @ingroup hci_transport
mbed_official 303:78e31413b129 18 *
mbed_official 303:78e31413b129 19 * @brief This module implements the CRC-16 calculation in the blocks.
mbed_official 303:78e31413b129 20 */
mbed_official 517:29297862eac1 21
mbed_official 303:78e31413b129 22 #ifndef CRC16_H__
mbed_official 303:78e31413b129 23 #define CRC16_H__
mbed_official 303:78e31413b129 24
mbed_official 303:78e31413b129 25 #include <stdint.h>
mbed_official 303:78e31413b129 26
mbed_official 303:78e31413b129 27 #ifdef __cplusplus
mbed_official 303:78e31413b129 28 extern "C" {
mbed_official 303:78e31413b129 29 #endif
mbed_official 303:78e31413b129 30
mbed_official 303:78e31413b129 31 /**@brief Function for calculating CRC-16 in blocks.
mbed_official 303:78e31413b129 32 *
mbed_official 517:29297862eac1 33 * Feed each consecutive data block into this function, along with the current value of p_crc as
mbed_official 517:29297862eac1 34 * returned by the previous call of this function. The first call of this function should pass NULL
mbed_official 303:78e31413b129 35 * as the initial value of the crc in p_crc.
mbed_official 303:78e31413b129 36 *
mbed_official 303:78e31413b129 37 * @param[in] p_data The input data block for computation.
mbed_official 303:78e31413b129 38 * @param[in] size The size of the input data block in bytes.
mbed_official 517:29297862eac1 39 * @param[in] p_crc The previous calculated CRC-16 value or NULL if first call.
mbed_official 303:78e31413b129 40 *
mbed_official 303:78e31413b129 41 * @return The updated CRC-16 value, based on the input supplied.
mbed_official 303:78e31413b129 42 */
mbed_official 303:78e31413b129 43 uint16_t crc16_compute(const uint8_t * p_data, uint32_t size, const uint16_t * p_crc);
mbed_official 303:78e31413b129 44
mbed_official 303:78e31413b129 45 #ifdef __cplusplus
mbed_official 303:78e31413b129 46 }
mbed_official 303:78e31413b129 47 #endif
mbed_official 303:78e31413b129 48
mbed_official 303:78e31413b129 49 #endif // CRC16_H__
mbed_official 517:29297862eac1 50
mbed_official 303:78e31413b129 51 /** @} */