crc: deprecate old headers and issue warning when used

Change code to use crc.h instead crc{8,16,32}.h and issue warning when
old headers are used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2018-12-02 09:58:22 -05:00 committed by Kumar Gala
commit b8424b4cae
10 changed files with 15 additions and 9 deletions

View file

@ -15,4 +15,7 @@
#include <crc.h> #include <crc.h>
#warning This include file is deprecated in favor of crc.h. \
Include crc.h instead.
#endif #endif

View file

@ -10,4 +10,7 @@
#include <crc.h> #include <crc.h>
#warning This include file is deprecated in favor of crc.h. \
Include crc.h instead.
#endif #endif

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <crc16.h> #include <crc.h>
u16_t crc16(const u8_t *src, size_t len, u16_t polynomial, u16_t crc16(const u8_t *src, size_t len, u16_t polynomial,
u16_t initial_value, bool pad) u16_t initial_value, bool pad)

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <crc32.h> #include <crc.h>
u32_t crc32_ieee(const u8_t *data, size_t len) u32_t crc32_ieee(const u8_t *data, size_t len)
{ {

View file

@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <crc8.h> #include <crc.h>
static const u8_t crc8_ccitt_small_table[16] = { static const u8_t crc8_ccitt_small_table[16] = {
0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,

View file

@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <crc8.h> #include <crc.h>
#include "fcb.h" #include "fcb.h"
#include "fcb_priv.h" #include "fcb_priv.h"

View file

@ -11,7 +11,7 @@
#include <init.h> #include <init.h>
#include <flash.h> #include <flash.h>
#include <fs.h> #include <fs.h>
#include <crc16.h> #include <crc.h>
#include <misc/__assert.h> #include <misc/__assert.h>
#include <misc/printk.h> #include <misc/printk.h>
#include <nffs/os.h> #include <nffs/os.h>

View file

@ -10,7 +10,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <nvs/nvs.h> #include <nvs/nvs.h>
#include <crc8.h> #include <crc.h>
#include "nvs_priv.h" #include "nvs_priv.h"
#define LOG_LEVEL CONFIG_NVS_LOG_LEVEL #define LOG_LEVEL CONFIG_NVS_LOG_LEVEL

View file

@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#include <errno.h> #include <errno.h>
#include <crc16.h> #include <crc.h>
#include <misc/byteorder.h> #include <misc/byteorder.h>
#include <net/buf.h> #include <net/buf.h>
#include <base64.h> #include <base64.h>

View file

@ -18,8 +18,8 @@
#include <kernel.h> #include <kernel.h>
#include <net/buf.h> #include <net/buf.h>
#include <misc/byteorder.h> #include <misc/byteorder.h>
#include <crc8.h> #include <crc.h>
#include <crc16.h> #include <crc.h>
#include <gpio.h> #include <gpio.h>
#include <led_strip.h> #include <led_strip.h>