mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
188:bcfe06ba3d64
Parent:
187:0387e8f68319
Child:
189:f392fc9709a3
--- a/drivers/MbedCRC.cpp	Thu Sep 06 13:40:20 2018 +0100
+++ b/drivers/MbedCRC.cpp	Thu Nov 08 11:46:34 2018 +0000
@@ -22,52 +22,22 @@
 /** \addtogroup drivers */
 /** @{*/
 
+SingletonPtr<PlatformMutex> mbed_crc_mutex;
+
 /* Default values for different types of polynomials
 */
 template<>
-MbedCRC<POLY_32BIT_ANSI, 32>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
-    _initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
+MbedCRC<POLY_32BIT_ANSI, 32>::MbedCRC():
+    _initial_value(~(0x0)), _final_xor(~(0x0)), _reflect_data(true), _reflect_remainder(true),
     _crc_table((uint32_t *)Table_CRC_32bit_ANSI)
 {
     mbed_crc_ctor();
 }
 
 template<>
-MbedCRC<POLY_8BIT_CCITT, 8>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
-    _initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
-    _crc_table((uint32_t *)Table_CRC_8bit_CCITT)
-{
-    mbed_crc_ctor();
-}
-
-template<>
-MbedCRC<POLY_7BIT_SD, 7>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
-    _initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
-    _crc_table((uint32_t *)Table_CRC_7Bit_SD)
-{
-    mbed_crc_ctor();
-}
-
-template<>
-MbedCRC<POLY_16BIT_CCITT, 16>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
-    _initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
-    _crc_table((uint32_t *)Table_CRC_16bit_CCITT)
-{
-    mbed_crc_ctor();
-}
-
-template<>
-MbedCRC<POLY_16BIT_IBM, 16>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
-    _initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
-    _crc_table((uint32_t *)Table_CRC_16bit_IBM)
-{
-    mbed_crc_ctor();
-}
-
-template<>
-MbedCRC<POLY_32BIT_ANSI, 32>::MbedCRC():
-    _initial_value(~(0x0)), _final_xor(~(0x0)), _reflect_data(true), _reflect_remainder(true),
-    _crc_table((uint32_t *)Table_CRC_32bit_ANSI)
+MbedCRC<POLY_32BIT_REV_ANSI, 32>::MbedCRC():
+    _initial_value(~(0x0)), _final_xor(~(0x0)), _reflect_data(false), _reflect_remainder(false),
+    _crc_table((uint32_t *)Table_CRC_32bit_Rev_ANSI)
 {
     mbed_crc_ctor();
 }