File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,11 @@ namespace mbed {
43
43
/* * \addtogroup drivers */
44
44
/* * @{*/
45
45
46
+ extern SingletonPtr<PlatformMutex> mbed_crc_mutex;
47
+
46
48
/* * CRC object provides CRC generation through hardware/software
47
49
*
48
- * ROM polynomial tables for supported polynomials (:: crc_polynomial_t ) will be used for
50
+ * ROM polynomial tables for supported polynomials (::crc_polynomial ) will be used for
49
51
* software CRC computation, if ROM tables are not available then CRC is computed runtime
50
52
* bit by bit for all data input.
51
53
* @note Synchronization level: Thread safe
@@ -93,9 +95,6 @@ namespace mbed {
93
95
* @endcode
94
96
* @ingroup drivers
95
97
*/
96
-
97
- extern SingletonPtr<PlatformMutex> mbed_crc_mutex;
98
-
99
98
template <uint32_t polynomial = POLY_32BIT_ANSI, uint8_t width = 32 >
100
99
class MbedCRC {
101
100
Original file line number Diff line number Diff line change 28
28
* Different polynomial values supported
29
29
*/
30
30
typedef enum crc_polynomial {
31
- POLY_OTHER = 0 ,
32
- POLY_8BIT_CCITT = 0x07 , // x8+x2+x+1
33
- POLY_7BIT_SD = 0x9 , // x7+x3+1;
34
- POLY_16BIT_CCITT = 0x1021 , // x16+x12+x5+1
35
- POLY_16BIT_IBM = 0x8005 , // x16+x15+x2+1
36
- POLY_32BIT_ANSI = 0x04C11DB7 , // x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
37
- POLY_32BIT_REV_ANSI = 0xEDB88320
31
+ POLY_OTHER = 0 , ///< Custom polynomial
32
+ POLY_8BIT_CCITT = 0x07 , ///< x8+x2+x+1
33
+ POLY_7BIT_SD = 0x9 , ///< x7+x3+1
34
+ POLY_16BIT_CCITT = 0x1021 , ///< x16+x12+x5+1
35
+ POLY_16BIT_IBM = 0x8005 , ///< x16+x15+x2+1
36
+ POLY_32BIT_ANSI = 0x04C11DB7 , ///< x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
37
+ POLY_32BIT_REV_ANSI = 0xEDB88320 ///< x31+x30+x29+x27+x26+x24+x23+x21+x20+x19+x15+x9+x8+x5
38
38
} crc_polynomial_t ;
39
39
40
40
typedef struct crc_mbed_config {
You can’t perform that action at this time.
0 commit comments