From 7bc51582f08817c3e4a41e191131d63f2fd503d1 Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Wed, 2 Jun 2021 21:13:42 -0700 Subject: [PATCH] make crc16 function accessible (#1857) --- esphome/components/modbus/modbus.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/modbus/modbus.h b/esphome/components/modbus/modbus.h index 91fc55b998..876c46b688 100644 --- a/esphome/components/modbus/modbus.h +++ b/esphome/components/modbus/modbus.h @@ -36,6 +36,8 @@ class Modbus : public uart::UARTDevice, public Component { std::vector devices_; }; +uint16_t crc16(const uint8_t *data, uint8_t len); + class ModbusDevice { public: void set_parent(Modbus *parent) { parent_ = parent; }