Fixed MODBUS and seneca drivers, added partial counter reset
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// #define DEBUGLOG_DEFAULT_LOG_LEVEL_TRACE
|
||||
|
||||
#include <DebugLog.h>
|
||||
#include <Arduino.h>
|
||||
#include <HardwareSerial.h> // Reference the ESP32 built-in serial port library
|
||||
@@ -50,7 +52,6 @@ namespace drivers
|
||||
typedef uint16_t crc_t;
|
||||
|
||||
public:
|
||||
|
||||
MODBUS(const uint32_t baud, const SerialConfig conf);
|
||||
|
||||
// Func 0x01
|
||||
@@ -84,7 +85,7 @@ namespace drivers
|
||||
const bool readBinary(const uint8_t device, const uint8_t func, const uint16_t reg, const uint16_t bits, std::vector<bool> &out);
|
||||
const bool readInteger(const uint8_t device, const uint8_t func, const uint16_t reg, const uint16_t num, std::vector<uint16_t> &out);
|
||||
const bool writeBinary(const uint8_t device, const uint8_t func, const uint16_t reg, const std::vector<bool> &in);
|
||||
const bool writeInteger(const uint8_t device, const uint8_t func, const uint16_t reg, const std::vector<uint16_t> &in);
|
||||
const bool writeInteger(const uint8_t device, const uint8_t func, const uint16_t reg, const std::vector<uint16_t> &in, const bool multi);
|
||||
const bool verifyCrc(const std::vector<uint8_t> &data);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user