Skip to content

Commit

Permalink
Fix wrong function name
Browse files Browse the repository at this point in the history
I hope this was the correct place to fix it. I don't know asciidoc.
  • Loading branch information
zzeroo authored and stephane committed Oct 25, 2017
1 parent 26dd610 commit ddc8233
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc/modbus_mapping_new_start_address.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.


Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ddc8233

Please sign in to comment.