mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 23:46:37 +02:00
* complete payload processed (and crc checked)
* inverter type is defined by serial number * serial debug can be switched live (using setup) -> Note: only one inverter is supported for now!
This commit is contained in:
parent
2dcf948d60
commit
724f0ab83a
10 changed files with 261 additions and 209 deletions
|
@ -11,8 +11,8 @@ uint8_t crc8(uint8_t buf[], uint8_t len) {
|
|||
return crc;
|
||||
}
|
||||
|
||||
uint16_t crc16(uint8_t buf[], uint8_t len) {
|
||||
uint16_t crc = 0xffff;
|
||||
uint16_t crc16(uint8_t buf[], uint8_t len, uint16_t start) {
|
||||
uint16_t crc = start;
|
||||
uint8_t shift = 0;
|
||||
|
||||
for(uint8_t i = 0; i < len; i ++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue