///\file /****************************************************************************** The MIT License(MIT) Embedded Template Library. https://github.com/ETLCPP/etl https://www.etlcpp.com Copyright(c) 2021 John Wellbelove Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions : The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ #ifndef ETL_CRC_PARAMETERS_INCLUDED #define ETL_CRC_PARAMETERS_INCLUDED #include "../platform.h" #include "../integral_limits.h" //***************************************************************************** // The parameters for these CRCs were created from https://crccalc.com/ //***************************************************************************** namespace etl { namespace private_crc { template struct crc_parameters { typedef TAccumulator accumulator_type; static ETL_CONSTANT TAccumulator Polynomial = Polynomial_; static ETL_CONSTANT TAccumulator Initial = Initial_; static ETL_CONSTANT TAccumulator Xor_Out = Xor_Out_; static ETL_CONSTANT bool Reflect = Reflect_; static ETL_CONSTANT size_t Accumulator_Bits = etl::integral_limits::bits; }; template ETL_CONSTANT TAccumulator crc_parameters::Polynomial; template ETL_CONSTANT TAccumulator crc_parameters::Initial; template ETL_CONSTANT TAccumulator crc_parameters::Xor_Out; template ETL_CONSTANT bool crc_parameters::Reflect; template ETL_CONSTANT size_t crc_parameters::Accumulator_Bits; // 8 bit. typedef crc_parameters crc8_ccitt_parameters; typedef crc_parameters crc8_rohc_parameters; typedef crc_parameters crc8_cdma2000_parameters; typedef crc_parameters crc8_darc_parameters; typedef crc_parameters crc8_dvbs2_parameters; typedef crc_parameters crc8_ebu_parameters; typedef crc_parameters crc8_icode_parameters; typedef crc_parameters crc8_itu_parameters; typedef crc_parameters crc8_maxim_parameters; typedef crc_parameters crc8_wcdma_parameters; typedef crc_parameters crc8_j1850_parameters; typedef crc_parameters crc8_j1850_zero_parameters; // 16 bit. typedef crc_parameters crc16_parameters; typedef crc_parameters crc16_ccitt_parameters; typedef crc_parameters crc16_aug_ccitt_parameters; typedef crc_parameters crc16_buypass_parameters; typedef crc_parameters crc16_genibus_parameters; typedef crc_parameters crc16_profibus_parameters; typedef crc_parameters crc16_kermit_parameters; typedef crc_parameters crc16_modbus_parameters; typedef crc_parameters crc16_usb_parameters; typedef crc_parameters crc16_x25_parameters; typedef crc_parameters crc16_xmodem_parameters; typedef crc_parameters crc16_cdma2000_parameters; typedef crc_parameters crc16_dds110_parameters; typedef crc_parameters crc16_dect_r_parameters; typedef crc_parameters crc16_dect_x_parameters; typedef crc_parameters crc16_dnp_parameters; typedef crc_parameters crc16_en13757_parameters; typedef crc_parameters crc16_maxim_parameters; typedef crc_parameters crc16_mcrf4xx_parameters; typedef crc_parameters crc16_riello_parameters; typedef crc_parameters crc16_t10dif_parameters; typedef crc_parameters crc16_teledisk_parameters; typedef crc_parameters crc16_tms37157_parameters; typedef crc_parameters crc16_a_parameters; typedef crc_parameters crc16_arc_parameters; typedef crc_parameters crc16_m17_parameters; // 32 bit. typedef crc_parameters crc32_parameters; typedef crc_parameters crc32_c_parameters; typedef crc_parameters crc32_bzip2_parameters; typedef crc_parameters crc32_mpeg2_parameters; typedef crc_parameters crc32_posix_parameters; typedef crc_parameters crc32_d_parameters; typedef crc_parameters crc32_q_parameters; typedef crc_parameters crc32_jamcrc_parameters; typedef crc_parameters crc32_xfer_parameters; // 64 bit. typedef crc_parameters crc64_ecma_parameters; } } #endif