r_pdl_crc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : CRC calculator API for RX62Nxx
  3. * File Name : r_pdl_crc.h
  4. * Version : 1.02
  5. * Contents : CRC function prototypes
  6. * Customer :
  7. * Model :
  8. * Order :
  9. * CPU : RX
  10. * Compiler : RXC
  11. * OS :
  12. * Programmer :
  13. * Note :
  14. ************************************************************************
  15. * Copyright, 2011. Renesas Electronics Corporation
  16. * and Renesas Solutions Corporation
  17. ************************************************************************
  18. * History : 2011.04.08
  19. * : Ver 1.02
  20. * : CS-5 release.
  21. *""FILE COMMENT END""**************************************************/
  22. #ifndef R_PDL_CRC_H
  23. #define R_PDL_CRC_H
  24. #include "r_pdl_common_defs_RX62Nxx.h"
  25. /* Function prototypes */
  26. bool R_CRC_Create(
  27. uint8_t
  28. );
  29. bool R_CRC_Destroy(
  30. void
  31. );
  32. bool R_CRC_Write(
  33. uint8_t
  34. );
  35. bool R_CRC_Read(
  36. uint8_t,
  37. uint16_t *
  38. );
  39. /* Polynomial selection */
  40. #define PDL_CRC_POLY_CRC_8 0x01u
  41. #define PDL_CRC_POLY_CRC_16 0x02u
  42. #define PDL_CRC_POLY_CRC_CCITT 0x04u
  43. /* Bit order */
  44. #define PDL_CRC_LSB_FIRST 0x08u
  45. #define PDL_CRC_MSB_FIRST 0x10u
  46. /* Result register clearing */
  47. #define PDL_CRC_CLEAR_RESULT 0x01u
  48. #define PDL_CRC_RETAIN_RESULT 0x02u
  49. #endif
  50. /* End of file */