diff --git a/drivers/MbedCRC.h b/drivers/MbedCRC.h index 3070f12c4a..7aaf3ea8fe 100644 --- a/drivers/MbedCRC.h +++ b/drivers/MbedCRC.h @@ -43,9 +43,11 @@ namespace mbed { /** \addtogroup drivers */ /** @{*/ +extern SingletonPtr mbed_crc_mutex; + /** CRC object provides CRC generation through hardware/software * - * ROM polynomial tables for supported polynomials (:: crc_polynomial_t) will be used for + * ROM polynomial tables for supported polynomials (::crc_polynomial) will be used for * software CRC computation, if ROM tables are not available then CRC is computed runtime * bit by bit for all data input. * @note Synchronization level: Thread safe @@ -93,9 +95,6 @@ namespace mbed { * @endcode * @ingroup drivers */ - -extern SingletonPtr mbed_crc_mutex; - template class MbedCRC { diff --git a/hal/crc_api.h b/hal/crc_api.h index c2b20cc8c7..5d3330b5ae 100644 --- a/hal/crc_api.h +++ b/hal/crc_api.h @@ -28,13 +28,13 @@ * Different polynomial values supported */ typedef enum crc_polynomial { - POLY_OTHER = 0, - POLY_8BIT_CCITT = 0x07, // x8+x2+x+1 - POLY_7BIT_SD = 0x9, // x7+x3+1; - POLY_16BIT_CCITT = 0x1021, // x16+x12+x5+1 - POLY_16BIT_IBM = 0x8005, // x16+x15+x2+1 - POLY_32BIT_ANSI = 0x04C11DB7, // x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1 - POLY_32BIT_REV_ANSI = 0xEDB88320 + POLY_OTHER = 0, ///< Custom polynomial + POLY_8BIT_CCITT = 0x07, ///< x8+x2+x+1 + POLY_7BIT_SD = 0x9, ///< x7+x3+1 + POLY_16BIT_CCITT = 0x1021, ///< x16+x12+x5+1 + POLY_16BIT_IBM = 0x8005, ///< x16+x15+x2+1 + POLY_32BIT_ANSI = 0x04C11DB7, ///< x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1 + POLY_32BIT_REV_ANSI = 0xEDB88320 ///< x31+x30+x29+x27+x26+x24+x23+x21+x20+x19+x15+x9+x8+x5 } crc_polynomial_t; typedef struct crc_mbed_config {