mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 16:06:38 +02:00
first changes to prepare code for esp32
This commit is contained in:
parent
6ac3876092
commit
1200ca0b79
6 changed files with 26 additions and 11 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue