first changes to prepare code for esp32

This commit is contained in:
Marcel Alburg 2022-08-15 22:42:08 +02:00
parent 6ac3876092
commit 1200ca0b79
6 changed files with 26 additions and 11 deletions

View file

@ -5,6 +5,8 @@
#include "crc.h"
namespace Hoymiles {
uint8_t crc8(uint8_t buf[], uint8_t len) {
uint8_t crc = CRC8_INIT;
for(uint8_t i = 0; i < len; i++) {
@ -33,3 +35,4 @@ uint16_t crc16(uint8_t buf[], uint8_t len, uint16_t start) {
}
return crc;
}
} // namespace Hoymiles