mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Wed Jul 08 07:45:08 2015 +0100
Revision:
584:7c5a5136e412
Synchronized with git revision a15892332f7dfbf7685582956fd7fa377aaddb51

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

Update mbed_overrides.c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 584:7c5a5136e412 1 /**********************************************************************
mbed_official 584:7c5a5136e412 2 *
mbed_official 584:7c5a5136e412 3 * Filename: crc.h
mbed_official 584:7c5a5136e412 4 *
mbed_official 584:7c5a5136e412 5 * Description: A header file describing the various CRC standards.
mbed_official 584:7c5a5136e412 6 *
mbed_official 584:7c5a5136e412 7 * Notes:
mbed_official 584:7c5a5136e412 8 *
mbed_official 584:7c5a5136e412 9 *
mbed_official 584:7c5a5136e412 10 * Copyright (c) 2000 by Michael Barr. This software is placed into
mbed_official 584:7c5a5136e412 11 * the public domain and may be used for any purpose. However, this
mbed_official 584:7c5a5136e412 12 * notice must not be changed or removed and no warranty is either
mbed_official 584:7c5a5136e412 13 * expressed or implied by its publication or distribution.
mbed_official 584:7c5a5136e412 14 **********************************************************************/
mbed_official 584:7c5a5136e412 15
mbed_official 584:7c5a5136e412 16 #ifndef _crc_h
mbed_official 584:7c5a5136e412 17 #define _crc_h
mbed_official 584:7c5a5136e412 18
mbed_official 584:7c5a5136e412 19
mbed_official 584:7c5a5136e412 20 #define FALSE 0
mbed_official 584:7c5a5136e412 21 #define TRUE !FALSE
mbed_official 584:7c5a5136e412 22
mbed_official 584:7c5a5136e412 23 /*
mbed_official 584:7c5a5136e412 24 * Select the CRC standard from the list that follows.
mbed_official 584:7c5a5136e412 25 */
mbed_official 584:7c5a5136e412 26 #define CRC16
mbed_official 584:7c5a5136e412 27
mbed_official 584:7c5a5136e412 28
mbed_official 584:7c5a5136e412 29 #if defined(CRC_CCITT)
mbed_official 584:7c5a5136e412 30
mbed_official 584:7c5a5136e412 31 typedef unsigned short crc;
mbed_official 584:7c5a5136e412 32
mbed_official 584:7c5a5136e412 33 #define CRC_NAME "CRC-CCITT"
mbed_official 584:7c5a5136e412 34 #define POLYNOMIAL 0x1021
mbed_official 584:7c5a5136e412 35 #define INITIAL_REMAINDER 0xFFFF
mbed_official 584:7c5a5136e412 36 #define FINAL_XOR_VALUE 0x0000
mbed_official 584:7c5a5136e412 37 #define REFLECT_DATA FALSE
mbed_official 584:7c5a5136e412 38 #define REFLECT_REMAINDER FALSE
mbed_official 584:7c5a5136e412 39 #define CHECK_VALUE 0x29B1
mbed_official 584:7c5a5136e412 40
mbed_official 584:7c5a5136e412 41 #elif defined(CRC16)
mbed_official 584:7c5a5136e412 42
mbed_official 584:7c5a5136e412 43 typedef unsigned short crc;
mbed_official 584:7c5a5136e412 44
mbed_official 584:7c5a5136e412 45 #define CRC_NAME "CRC-16"
mbed_official 584:7c5a5136e412 46 #define POLYNOMIAL 0x8005
mbed_official 584:7c5a5136e412 47 #define INITIAL_REMAINDER 0x0000
mbed_official 584:7c5a5136e412 48 #define FINAL_XOR_VALUE 0x0000
mbed_official 584:7c5a5136e412 49 #define REFLECT_DATA TRUE
mbed_official 584:7c5a5136e412 50 #define REFLECT_REMAINDER TRUE
mbed_official 584:7c5a5136e412 51 #define CHECK_VALUE 0xBB3D
mbed_official 584:7c5a5136e412 52
mbed_official 584:7c5a5136e412 53 #elif defined(CRC32)
mbed_official 584:7c5a5136e412 54
mbed_official 584:7c5a5136e412 55 typedef unsigned long crc;
mbed_official 584:7c5a5136e412 56
mbed_official 584:7c5a5136e412 57 #define CRC_NAME "CRC-32"
mbed_official 584:7c5a5136e412 58 #define POLYNOMIAL 0x04C11DB7
mbed_official 584:7c5a5136e412 59 #define INITIAL_REMAINDER 0xFFFFFFFF
mbed_official 584:7c5a5136e412 60 #define FINAL_XOR_VALUE 0xFFFFFFFF
mbed_official 584:7c5a5136e412 61 #define REFLECT_DATA TRUE
mbed_official 584:7c5a5136e412 62 #define REFLECT_REMAINDER TRUE
mbed_official 584:7c5a5136e412 63 #define CHECK_VALUE 0xCBF43926
mbed_official 584:7c5a5136e412 64
mbed_official 584:7c5a5136e412 65 #else
mbed_official 584:7c5a5136e412 66
mbed_official 584:7c5a5136e412 67 #error "One of CRC_CCITT, CRC16, or CRC32 must be #define'd."
mbed_official 584:7c5a5136e412 68
mbed_official 584:7c5a5136e412 69 #endif
mbed_official 584:7c5a5136e412 70
mbed_official 584:7c5a5136e412 71
mbed_official 584:7c5a5136e412 72 void crcInit(void);
mbed_official 584:7c5a5136e412 73 crc crcSlow(unsigned char const message[], int nBytes);
mbed_official 584:7c5a5136e412 74 crc crcFast(unsigned char const message[], int nBytes);
mbed_official 584:7c5a5136e412 75
mbed_official 584:7c5a5136e412 76
mbed_official 584:7c5a5136e412 77 #endif /* _crc_h */