crc.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * =====================================================================================
  3. *
  4. * ________ .__ __ ________ ____ ________
  5. * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/
  6. * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \
  7. * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \
  8. * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ /
  9. * \__> \/ \/ \/ \/ \/
  10. *
  11. * www.optixx.org
  12. *
  13. *
  14. * Version: 1.0
  15. * Created: 07/21/2009 03:32:16 PM
  16. * Author: david@optixx.org
  17. *
  18. * =====================================================================================
  19. */
  20. #ifndef __CRC_H__
  21. #define __CRC_H__
  22. #include <stdlib.h>
  23. #include <stdint.h>
  24. uint16_t crc_xmodem_update(uint16_t crc, uint8_t data);
  25. uint16_t do_crc(uint8_t * data,uint16_t size);
  26. uint16_t do_crc_update(uint16_t crc,uint8_t * data,uint16_t size);
  27. void crc_check_memory(uint32_t bottom_addr,uint32_t top_addr,uint32_t bank_size,uint8_t *buffer);
  28. uint16_t crc_check_memory_range(uint32_t start_addr, uint32_t size,uint8_t *buffer);
  29. uint16_t crc_check_bulk_memory(uint32_t bottom_addr, uint32_t bank_size,uint32_t top_addr);
  30. #endif