Commit Graph

10 Commits (ba5b5a38708b16453c73a197e3fbc2f4855e29ac)

Author SHA1 Message Date
Steven Cartmell d53ffb7022 HAL CRC: Fix inverted CRC mode selection 2018-05-24 17:51:49 +01:00
Steven Cartmell 8e14b5977b HAL CRC: Add bit width parameter to crc_config_t 2018-05-24 17:51:49 +01:00
Steven Cartmell e1ca2b32fc Add CRC configuration options to HAL API 2018-05-24 17:51:49 +01:00
Steven Cartmell 5847f0c975 Fix CRC class coding conventions 2018-05-24 17:51:48 +01:00
Steven Cartmell e0d98bfe2c Adapt MbedCRC class to support Hardware CRC
- Move CRC polynomial enum into HAL layer, so it's accessible from platform
  implementations

- Add enum to CRC class to indicate which mode the CRC class should use:
  HARDWARE, TABLE, or BITWISE

- Add calls to HAL Hardware CRC API to each of the compute functions when the
  class is in HARDWARE mode.

- Add missing constructor call to template constructor, and remove const from
  delegating constructor.
2018-05-24 17:50:12 +01:00
Deepika 331620e1d0 Default constructor for template class should be part of header file 2018-03-23 14:55:07 -05:00
deepikabhavnani b60eb1d001 Updated table to be const and small fixes 2018-02-27 09:35:55 -06:00
deepikabhavnani af0982295f Moved specialized functions to CPP file
Template specialized functions are moved to cpp file, to add MbedCRC.h
in mbed.h. Else linker shall multiple definition error.
2018-02-20 08:12:44 -06:00
deepikabhavnani 8e537115c5 Removed init/deinit and added cpp file for tables 2018-02-02 09:43:06 -06:00
deepikabhavnani afe8834bb8 CRC class implementation
CRC class `MbedCRC.h` is templated class created to support hardware/software
CRCs. Default CRC will be hardware CRC when support for HAL is available.

Polynomial tables are available for 8/16 bit CCITT, 7/16 bit for SD card and
32-bit ANSI. Polynomial table implementation will be used if Hardware CRC is
not available.

In case device does not have hardware CRC and polynomial table is not supported,
CRC is still available and is computed runtime bit by bit for all data input.
2018-01-24 13:26:41 -06:00