Skip to content

Commit 65ec496

Browse files
committed
Fix some typos
Originally done in arduino-libraries/ArduinoModbus#12
1 parent 76f71c4 commit 65ec496

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/modbus-rtu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
842842
ONCLR ant others needs OPOST to be enabled
843843
*/
844844

845-
/* Raw ouput */
845+
/* Raw output */
846846
tios.c_oflag &=~ OPOST;
847847

848848
/* C_CC Control characters

src/modbus-tcp-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define _MODBUS_TCP_CHECKSUM_LENGTH 0
1515

1616
/* In both structures, the transaction ID must be placed on first position
17-
to have a quick access not dependant of the TCP backend */
17+
to have a quick access not dependent of the TCP backend */
1818
typedef struct _modbus_tcp {
1919
/* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b
2020
(page 23/46):

src/modbus-tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static int _modbus_tcp_prepare_response_tid(const uint8_t *req, int *req_length)
154154

155155
static int _modbus_tcp_send_msg_pre(uint8_t *req, int req_length)
156156
{
157-
/* Substract the header length to the message length */
157+
/* Subtract the header length to the message length */
158158
int mbap_length = req_length - 6;
159159

160160
req[4] = mbap_length >> 8;
@@ -905,7 +905,7 @@ modbus_t* modbus_new_tcp_pi(const char *node, const char *service)
905905
dest_size = sizeof(char) * _MODBUS_TCP_PI_SERVICE_LENGTH;
906906
ret_size = strlcpy(ctx_tcp_pi->service, service, dest_size);
907907
} else {
908-
/* Empty service is not allowed, error catched below. */
908+
/* Empty service is not allowed, error caught below. */
909909
ret_size = 0;
910910
}
911911

src/modbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ int modbus_mask_write_register(modbus_t *ctx, int addr, uint16_t and_mask, uint1
14061406
int rc;
14071407
int req_length;
14081408
/* The request length can not exceed _MIN_REQ_LENGTH - 2 and 4 bytes to
1409-
* store the masks. The ugly substraction is there to remove the 'nb' value
1409+
* store the masks. The ugly subtraction is there to remove the 'nb' value
14101410
* (2 bytes) which is not used. */
14111411
uint8_t req[_MIN_REQ_LENGTH + 2];
14121412

0 commit comments

Comments
 (0)