diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -132,3 +132,11 @@ long atol(const char *ptr) return acc; } + +uint8_t csum8(uint8_t *buf, uint32_t len) +{ + uint32_t s = 0; + while (len-- > 0) + s += *buf++; + return s; +} |