You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
226 B

  1. #include "protocol.h"
  2. uint8_t computesum8(char *data, size_t size)
  3. {
  4. uint8_t sum8 = 0;
  5. for (unsigned i = 0; i < size; ++i)
  6. {
  7. sum8 += data[i];
  8. // ESP_LOGI(TAG, "%d", sum8);
  9. }
  10. return sum8;
  11. }