Browse Source

Fix wrong function name

I hope this was the correct place to fix it. I don't know asciidoc.
zzeroo 7 years ago
parent
commit
ddc82338ab
2 changed files with 4 additions and 4 deletions
  1. 3 3
      doc/modbus_mapping_new_start_address.txt
  2. 1 1
      src/modbus.c

+ 3 - 3
doc/modbus_mapping_new_start_address.txt

@@ -28,7 +28,7 @@ make available registers from 10000 to 10009, you can use:
 
 [source,c]
 -------------------
-mb_mapping = modbus_mapping_offset_start_address(0, 0, 0, 0, 10000, 10, 0, 0);
+mb_mapping = modbus_mapping_new_start_address(0, 0, 0, 0, 10000, 10, 0, 0);
 -------------------
 
 With this code, only 10 registers (`uint16_t`) are allocated.
@@ -41,7 +41,7 @@ This function is convenient to handle requests in a Modbus server/slave.
 
 RETURN VALUE
 ------------
-The _modbus_mapping_offset_new()_ function shall return the new allocated structure if
+The _modbus_mapping_new_start_address()_ function shall return the new allocated structure if
 successful. Otherwise it shall return NULL and set errno.
 
 
@@ -57,7 +57,7 @@ EXAMPLE
 -------------------
 /* The first value of each array is accessible at the defined address.
    The end address is ADDRESS + NB - 1. */
-mb_mapping = modbus_mapping_offset_start_address(BITS_ADDRESS, BITS_NB,
+mb_mapping = modbus_mapping_new_start_address(BITS_ADDRESS, BITS_NB,
                                 INPUT_BITS_ADDRESS, INPUT_BITS_NB,
                                 REGISTERS_ADDRESS, REGISTERS_NB,
                                 INPUT_REGISTERS_ADDRESS, INPUT_REGISTERS_NB);

+ 1 - 1
src/modbus.c

@@ -1761,7 +1761,7 @@ int modbus_set_debug(modbus_t *ctx, int flag)
 /* Allocates 4 arrays to store bits, input bits, registers and inputs
    registers. The pointers are stored in modbus_mapping structure.
 
-   The modbus_mapping_new_ranges() function shall return the new allocated
+   The modbus_mapping_new_start_address() function shall return the new allocated
    structure if successful. Otherwise it shall return NULL and set errno to
    ENOMEM. */
 modbus_mapping_t* modbus_mapping_new_start_address(