Commit ddc82338ab219181cf0ed2c6d20cafbd5f2365a6
Committed by
Stéphane Raimbault
1 parent
26dd610b
Fix wrong function name
I hope this was the correct place to fix it. I don't know asciidoc.
Showing
2 changed files
with
4 additions
and
4 deletions
doc/modbus_mapping_new_start_address.txt
| @@ -28,7 +28,7 @@ make available registers from 10000 to 10009, you can use: | @@ -28,7 +28,7 @@ make available registers from 10000 to 10009, you can use: | ||
| 28 | 28 | ||
| 29 | [source,c] | 29 | [source,c] |
| 30 | ------------------- | 30 | ------------------- |
| 31 | -mb_mapping = modbus_mapping_offset_start_address(0, 0, 0, 0, 10000, 10, 0, 0); | 31 | +mb_mapping = modbus_mapping_new_start_address(0, 0, 0, 0, 10000, 10, 0, 0); |
| 32 | ------------------- | 32 | ------------------- |
| 33 | 33 | ||
| 34 | With this code, only 10 registers (`uint16_t`) are allocated. | 34 | 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. | @@ -41,7 +41,7 @@ This function is convenient to handle requests in a Modbus server/slave. | ||
| 41 | 41 | ||
| 42 | RETURN VALUE | 42 | RETURN VALUE |
| 43 | ------------ | 43 | ------------ |
| 44 | -The _modbus_mapping_offset_new()_ function shall return the new allocated structure if | 44 | +The _modbus_mapping_new_start_address()_ function shall return the new allocated structure if |
| 45 | successful. Otherwise it shall return NULL and set errno. | 45 | successful. Otherwise it shall return NULL and set errno. |
| 46 | 46 | ||
| 47 | 47 | ||
| @@ -57,7 +57,7 @@ EXAMPLE | @@ -57,7 +57,7 @@ EXAMPLE | ||
| 57 | ------------------- | 57 | ------------------- |
| 58 | /* The first value of each array is accessible at the defined address. | 58 | /* The first value of each array is accessible at the defined address. |
| 59 | The end address is ADDRESS + NB - 1. */ | 59 | The end address is ADDRESS + NB - 1. */ |
| 60 | -mb_mapping = modbus_mapping_offset_start_address(BITS_ADDRESS, BITS_NB, | 60 | +mb_mapping = modbus_mapping_new_start_address(BITS_ADDRESS, BITS_NB, |
| 61 | INPUT_BITS_ADDRESS, INPUT_BITS_NB, | 61 | INPUT_BITS_ADDRESS, INPUT_BITS_NB, |
| 62 | REGISTERS_ADDRESS, REGISTERS_NB, | 62 | REGISTERS_ADDRESS, REGISTERS_NB, |
| 63 | INPUT_REGISTERS_ADDRESS, INPUT_REGISTERS_NB); | 63 | INPUT_REGISTERS_ADDRESS, INPUT_REGISTERS_NB); |
src/modbus.c
| @@ -1761,7 +1761,7 @@ int modbus_set_debug(modbus_t *ctx, int flag) | @@ -1761,7 +1761,7 @@ int modbus_set_debug(modbus_t *ctx, int flag) | ||
| 1761 | /* Allocates 4 arrays to store bits, input bits, registers and inputs | 1761 | /* Allocates 4 arrays to store bits, input bits, registers and inputs |
| 1762 | registers. The pointers are stored in modbus_mapping structure. | 1762 | registers. The pointers are stored in modbus_mapping structure. |
| 1763 | 1763 | ||
| 1764 | - The modbus_mapping_new_ranges() function shall return the new allocated | 1764 | + The modbus_mapping_new_start_address() function shall return the new allocated |
| 1765 | structure if successful. Otherwise it shall return NULL and set errno to | 1765 | structure if successful. Otherwise it shall return NULL and set errno to |
| 1766 | ENOMEM. */ | 1766 | ENOMEM. */ |
| 1767 | modbus_mapping_t* modbus_mapping_new_start_address( | 1767 | modbus_mapping_t* modbus_mapping_new_start_address( |