Commit edf461e83099b6f8d414c5709e2ca06649a538b0

Authored by Stéphane Raimbault
1 parent 29fc0682

Fix typo on set verb

Showing 2 changed files with 6 additions and 5 deletions
src/modbus.c
@@ -247,7 +247,8 @@ static int build_query_basis_tcp(int slave, int function, @@ -247,7 +247,8 @@ static int build_query_basis_tcp(int slave, int function,
247 query[2] = 0; 247 query[2] = 0;
248 query[3] = 0; 248 query[3] = 0;
249 249
250 - /* Length to fix later with set_query_length_tcp (4 and 5) */ 250 + /* Length will be defined later by set_query_length_tcp at offsets 4
  251 + * and 5 */
251 252
252 query[6] = slave; 253 query[6] = slave;
253 query[7] = function; 254 query[7] = function;
@@ -1867,7 +1868,7 @@ int modbus_slave_accept_tcp(modbus_param_t *mb_param, int *socket) @@ -1867,7 +1868,7 @@ int modbus_slave_accept_tcp(modbus_param_t *mb_param, int *socket)
1867 /** Utils **/ 1868 /** Utils **/
1868 1869
1869 /* Sets many input/coil status from a single byte value (all 8 bits of 1870 /* Sets many input/coil status from a single byte value (all 8 bits of
1870 - the byte value are setted) */ 1871 + the byte value are set) */
1871 void set_bits_from_byte(uint8_t *dest, int address, const uint8_t value) 1872 void set_bits_from_byte(uint8_t *dest, int address, const uint8_t value)
1872 { 1873 {
1873 int i; 1874 int i;
@@ -1878,7 +1879,7 @@ void set_bits_from_byte(uint8_t *dest, int address, const uint8_t value) @@ -1878,7 +1879,7 @@ void set_bits_from_byte(uint8_t *dest, int address, const uint8_t value)
1878 } 1879 }
1879 1880
1880 /* Sets many input/coil status from a table of bytes (only the bits 1881 /* Sets many input/coil status from a table of bytes (only the bits
1881 - between address and address + nb_bits are setted) */ 1882 + between address and address + nb_bits are set) */
1882 void set_bits_from_bytes(uint8_t *dest, int address, int nb_bits, 1883 void set_bits_from_bytes(uint8_t *dest, int address, int nb_bits,
1883 const uint8_t tab_byte[]) 1884 const uint8_t tab_byte[])
1884 { 1885 {
src/modbus.h
@@ -324,11 +324,11 @@ void modbus_slave_manage(modbus_param_t *mb_param, const uint8_t *query, @@ -324,11 +324,11 @@ void modbus_slave_manage(modbus_param_t *mb_param, const uint8_t *query,
324 **/ 324 **/
325 325
326 /* Sets many input/coil status from a single byte value (all 8 bits of 326 /* Sets many input/coil status from a single byte value (all 8 bits of
327 - the byte value are setted) */ 327 + the byte value are set) */
328 void set_bits_from_byte(uint8_t *dest, int address, const uint8_t value); 328 void set_bits_from_byte(uint8_t *dest, int address, const uint8_t value);
329 329
330 /* Sets many input/coil status from a table of bytes (only the bits 330 /* Sets many input/coil status from a table of bytes (only the bits
331 - between address and address + nb_bits are setted) */ 331 + between address and address + nb_bits are set) */
332 void set_bits_from_bytes(uint8_t *dest, int address, int nb_bits, 332 void set_bits_from_bytes(uint8_t *dest, int address, int nb_bits,
333 const uint8_t *tab_byte); 333 const uint8_t *tab_byte);
334 334