"cleaning"

This commit is contained in:
jaakkoiot 2022-10-18 02:31:04 +03:00
commit f13bc2938a
3 changed files with 10 additions and 5 deletions

View File

@ -53,7 +53,6 @@ Set to 1 to enable debugging features within class:
#include "Arduino.h" #include "Arduino.h"
#else #else
//#include "WProgram.h" //#include "WProgram.h"
#include "SerialPort.h"
#include <stdint.h> #include <stdint.h>
#include <cstddef> #include <cstddef>
#endif #endif
@ -244,10 +243,10 @@ class ModbusMaster
uint16_t _u16WriteAddress; ///< slave register to which to write uint16_t _u16WriteAddress; ///< slave register to which to write
uint16_t _u16WriteQty; ///< quantity of words to write uint16_t _u16WriteQty; ///< quantity of words to write
uint16_t _u16TransmitBuffer[ku8MaxBufferSize]; ///< buffer containing data to transmit to Modbus slave; set via SetTransmitBuffer() uint16_t _u16TransmitBuffer[ku8MaxBufferSize]; ///< buffer containing data to transmit to Modbus slave; set via SetTransmitBuffer()
uint16_t* txBuffer; uint16_t* txBuffer; // from Wire.h -- need to clean this up Rx
uint8_t _u8TransmitBufferIndex; uint8_t _u8TransmitBufferIndex;
uint16_t u16TransmitBufferLength; uint16_t u16TransmitBufferLength;
uint16_t* rxBuffer; uint16_t* rxBuffer; // from Wire.h -- need to clean this up Rx
uint8_t _u8ResponseBufferIndex; uint8_t _u8ResponseBufferIndex;
uint8_t _u8ResponseBufferLength; uint8_t _u8ResponseBufferLength;
@ -256,8 +255,6 @@ class ModbusMaster
static const uint8_t ku8MBReadDiscreteInputs = 0x02; ///< Modbus function 0x02 Read Discrete Inputs static const uint8_t ku8MBReadDiscreteInputs = 0x02; ///< Modbus function 0x02 Read Discrete Inputs
static const uint8_t ku8MBWriteSingleCoil = 0x05; ///< Modbus function 0x05 Write Single Coil static const uint8_t ku8MBWriteSingleCoil = 0x05; ///< Modbus function 0x05 Write Single Coil
static const uint8_t ku8MBWriteMultipleCoils = 0x0F; ///< Modbus function 0x0F Write Multiple Coils static const uint8_t ku8MBWriteMultipleCoils = 0x0F; ///< Modbus function 0x0F Write Multiple Coils
static const uint8_t ku8MBWriteMultipleRegisters = 0x10; ///< Modbus function 0x10 Write Multiple Registers
// Modbus function codes for 16 bit access // Modbus function codes for 16 bit access
static const uint8_t ku8MBReadHoldingRegisters = 0x03; ///< Modbus function 0x03 Read Holding Registers static const uint8_t ku8MBReadHoldingRegisters = 0x03; ///< Modbus function 0x03 Read Holding Registers

View File

@ -1,3 +1,8 @@
<<<<<<< HEAD
=======
>>>>>>> bada194ebe7490c25ca7589366224d4ae0f80eab
#ifndef SERIALPORT_H_ #ifndef SERIALPORT_H_
#define SERIALPORT_H_ #define SERIALPORT_H_

View File

@ -39,7 +39,10 @@ Arduino library for communicating with Modbus slaves over RS232/485 (via RTU pro
#elif defined(ARDUINO_ARCH_SAM) #elif defined(ARDUINO_ARCH_SAM)
UARTClass* MBSerial = &Serial; ///< Pointer to Serial class object UARTClass* MBSerial = &Serial; ///< Pointer to Serial class object
#else #else
<<<<<<< HEAD
//In the case of undefined Serial the code should still function //In the case of undefined Serial the code should still function
=======
>>>>>>> bada194ebe7490c25ca7589366224d4ae0f80eab
// #error "This library only supports boards with an AVR or SAM processor. Please open an issue at https://github.com/4-20ma/ModbusMaster/issues and indicate which processor/platform you're using." // #error "This library only supports boards with an AVR or SAM processor. Please open an issue at https://github.com/4-20ma/ModbusMaster/issues and indicate which processor/platform you're using."
#endif #endif