mirror of
https://github.com/esphome/esphome.git
synced 2025-09-13 00:32:20 +01:00
Make crc8 const-correct (#7027)
This commit is contained in:
committed by
GitHub
parent
7aaa5ce9c8
commit
582386d3a2
@@ -155,7 +155,7 @@ template<typename T, typename U> T remap(U value, U min, U max, T min_out, T max
|
||||
}
|
||||
|
||||
/// Calculate a CRC-8 checksum of \p data with size \p len.
|
||||
uint8_t crc8(uint8_t *data, uint8_t len);
|
||||
uint8_t crc8(const uint8_t *data, uint8_t len);
|
||||
|
||||
/// Calculate a CRC-16 checksum of \p data with size \p len.
|
||||
uint16_t crc16(const uint8_t *data, uint16_t len, uint16_t crc = 0xffff, uint16_t reverse_poly = 0xa001,
|
||||
|
Reference in New Issue
Block a user