@@ -10,8 +10,8 @@ Modbus::Modbus() {
1010 _additional_data = 0 ;
1111}
1212
13- TRegister* Modbus::searchRegister (word address) {
14- TRegister *reg = _regs_head;
13+ TRegister * Modbus::searchRegister (word address) {
14+ TRegister * reg = _regs_head;
1515 // if there is no register configured, bail
1616 if (reg == 0 ) {
1717 return (0 );
@@ -29,7 +29,7 @@ TRegister* Modbus::searchRegister (word address) {
2929}
3030
3131void Modbus::addReg (word address, word value) {
32- TRegister *newreg;
32+ TRegister * newreg;
3333
3434 newreg = (TRegister *) malloc (sizeof (TRegister));
3535 newreg->address = address;
@@ -49,7 +49,7 @@ void Modbus::addReg (word address, word value) {
4949}
5050
5151bool Modbus::Reg (word address, word value) {
52- TRegister *reg;
52+ TRegister * reg;
5353 // search for the register address
5454 reg = this ->searchRegister (address);
5555 // if found then assign the register value to the new value.
@@ -63,7 +63,7 @@ bool Modbus::Reg (word address, word value) {
6363}
6464
6565word Modbus::Reg (word address) {
66- TRegister *reg;
66+ TRegister * reg;
6767 reg = this ->searchRegister (address);
6868 if (reg) {
6969 return (reg->value );
@@ -134,7 +134,7 @@ word Modbus::Ireg (word offset) {
134134#endif
135135
136136
137- void Modbus::receivePDU (byte* frame) {
137+ void Modbus::receivePDU (byte * frame) {
138138 byte fcode = frame[0 ];
139139 word field1 = (word) frame[1 ] << 8 | (word) frame[2 ];
140140 word field2 = (word) frame[3 ] << 8 | (word) frame[4 ];
@@ -305,7 +305,7 @@ void Modbus::writeSingleRegister (word reg, word value) {
305305 _reply = MB_REPLY_ECHO;
306306}
307307
308- void Modbus::writeMultipleRegisters (byte* frame, word startreg, word numoutputs, byte bytecount) {
308+ void Modbus::writeMultipleRegisters (byte * frame, word startreg, word numoutputs, byte bytecount) {
309309 // Check value
310310 if (numoutputs < 0x0001 || numoutputs > 0x007B || bytecount != 2 * numoutputs) {
311311 this ->exceptionResponse (MB_FC_WRITE_REGS, MB_EX_ILLEGAL_VALUE);
@@ -532,7 +532,7 @@ void Modbus::writeSingleCoil (word reg, word status) {
532532 _reply = MB_REPLY_ECHO;
533533}
534534
535- void Modbus::writeMultipleCoils (byte* frame, word startreg, word numoutputs, byte bytecount) {
535+ void Modbus::writeMultipleCoils (byte * frame, word startreg, word numoutputs, byte bytecount) {
536536 // Check value
537537 word bytecount_calc = numoutputs / 8 ;
538538 if (numoutputs % 8 ) {
0 commit comments