summaryrefslogtreecommitdiff
path: root/apps/include/modbus/mb.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/include/modbus/mb.h')
-rw-r--r--apps/include/modbus/mb.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/apps/include/modbus/mb.h b/apps/include/modbus/mb.h
index be7c0df90..e6f76b1d5 100644
--- a/apps/include/modbus/mb.h
+++ b/apps/include/modbus/mb.h
@@ -1,4 +1,4 @@
-/*
+/*
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
* All rights reserved.
@@ -73,7 +73,7 @@ PR_BEGIN_EXTERN_C
/*! \ingroup modbus
* \brief Use the default Modbus TCP port (502)
*/
-#define MB_TCP_PORT_USE_DEFAULT 0
+#define MB_TCP_PORT_USE_DEFAULT 0
/* ----------------------- Type definitions ---------------------------------*/
@@ -99,7 +99,7 @@ PR_BEGIN_EXTERN_C
* registers should be updated and reading means that the modbus protocol
* stack needs to know the current register values.
*
- * \see eMBRegHoldingCB( ), eMBRegCoilsCB( ), eMBRegDiscreteCB( ) and
+ * \see eMBRegHoldingCB( ), eMBRegCoilsCB( ), eMBRegDiscreteCB( ) and
* eMBRegInputCB( ).
*/
typedef enum
@@ -143,7 +143,7 @@ typedef enum
*
* \return If no error occurs the function returns eMBErrorCode::MB_ENOERR.
* The protocol is then in the disabled state and ready for activation
- * by calling eMBEnable( ). Otherwise one of the following error codes
+ * by calling eMBEnable( ). Otherwise one of the following error codes
* is returned:
* - eMBErrorCode::MB_EINVAL If the slave address was not valid. Valid
* slave addresses are in the range 1 - 247.
@@ -172,10 +172,10 @@ eMBErrorCode eMBTCPInit( uint16_t usTCPPort );
* \brief Release resources used by the protocol stack.
*
* This function disables the Modbus protocol stack and release all
- * hardware resources. It must only be called when the protocol stack
- * is disabled.
+ * hardware resources. It must only be called when the protocol stack
+ * is disabled.
*
- * \note Note all ports implement this function. A port which wants to
+ * \note Note all ports implement this function. A port which wants to
* get an callback must define the macro MB_PORT_HAS_CLOSE to 1.
*
* \return If the resources where released it return eMBErrorCode::MB_ENOERR.
@@ -190,8 +190,8 @@ eMBErrorCode eMBClose( void );
* This function enables processing of Modbus frames. Enabling the protocol
* stack is only possible if it is in the disabled state.
*
- * \return If the protocol stack is now in the state enabled it returns
- * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it
+ * \return If the protocol stack is now in the state enabled it returns
+ * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it
* return eMBErrorCode::MB_EILLSTATE.
*/
eMBErrorCode eMBEnable( void );
@@ -201,7 +201,7 @@ eMBErrorCode eMBEnable( void );
*
* This function disables processing of Modbus frames.
*
- * \return If the protocol stack has been disabled it returns
+ * \return If the protocol stack has been disabled it returns
* eMBErrorCode::MB_ENOERR. If it was not in the enabled state it returns
* eMBErrorCode::MB_EILLSTATE.
*/
@@ -213,10 +213,10 @@ eMBErrorCode eMBDisable( void );
* This function must be called periodically. The timer interval required
* is given by the application dependent Modbus slave timeout. Internally the
* function calls xMBPortEventGet() and waits for an event from the receiver or
- * transmitter state machines.
+ * transmitter state machines.
*
* \return If the protocol stack is not in the enabled state the function
- * returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns
+ * returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns
* eMBErrorCode::MB_ENOERR.
*/
eMBErrorCode eMBPoll( void );
@@ -250,7 +250,7 @@ eMBErrorCode eMBSetSlaveID( uint8_t ucSlaveID, bool xIsRunning,
* The callback handler supplied is responsible for interpreting the Modbus PDU and
* the creation of an appropriate response. In case of an error it should return
* one of the possible Modbus exceptions which results in a Modbus exception frame
- * sent by the protocol stack.
+ * sent by the protocol stack.
*
* \param ucFunctionCode The Modbus function code for which this handler should
* be registers. Valid function codes are in the range 1 to 127.
@@ -263,7 +263,7 @@ eMBErrorCode eMBSetSlaveID( uint8_t ucSlaveID, bool xIsRunning,
* case the values in config.h should be adjusted. If the argument was not
* valid it returns eMBErrorCode::MB_EINVAL.
*/
-eMBErrorCode eMBRegisterCB( uint8_t ucFunctionCode,
+eMBErrorCode eMBRegisterCB( uint8_t ucFunctionCode,
pxMBFunctionHandler pxHandler );
/* ----------------------- Callback -----------------------------------------*/
@@ -301,7 +301,7 @@ eMBErrorCode eMBRegisterCB( uint8_t ucFunctionCode,
* - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
* Modbus response is sent.
* - eMBErrorCode::MB_ENOREG If the application can not supply values
- * for registers within this range. In this case a
+ * for registers within this range. In this case a
* <b>ILLEGAL DATA ADDRESS</b> exception frame is sent as a response.
* - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
* currently not available and the application dependent response
@@ -325,18 +325,18 @@ eMBErrorCode eMBRegInputCB( uint8_t * pucRegBuffer, uint16_t usAddress,
* this buffer.
* \param usAddress The starting address of the register.
* \param usNRegs Number of registers to read or write.
- * \param eMode If eMBRegisterMode::MB_REG_WRITE the application register
+ * \param eMode If eMBRegisterMode::MB_REG_WRITE the application register
* values should be updated from the values in the buffer. For example
- * this would be the case when the Modbus master has issued an
+ * this would be the case when the Modbus master has issued an
* <b>WRITE SINGLE REGISTER</b> command.
- * If the value eMBRegisterMode::MB_REG_READ the application should copy
+ * If the value eMBRegisterMode::MB_REG_READ the application should copy
* the current values into the buffer \c pucRegBuffer.
*
* \return The function must return one of the following error codes:
* - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
* Modbus response is sent.
* - eMBErrorCode::MB_ENOREG If the application can not supply values
- * for registers within this range. In this case a
+ * for registers within this range. In this case a
* <b>ILLEGAL DATA ADDRESS</b> exception frame is sent as a response.
* - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
* currently not available and the application dependent response
@@ -371,7 +371,7 @@ eMBErrorCode eMBRegHoldingCB( uint8_t * pucRegBuffer, uint16_t usAddress,
* - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
* Modbus response is sent.
* - eMBErrorCode::MB_ENOREG If the application does not map an coils
- * within the requested address range. In this case a
+ * within the requested address range. In this case a
* <b>ILLEGAL DATA ADDRESS</b> is sent as a response.
* - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
* currently not available and the application dependent response
@@ -400,7 +400,7 @@ eMBErrorCode eMBRegCoilsCB( uint8_t * pucRegBuffer, uint16_t usAddress,
* - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
* Modbus response is sent.
* - eMBErrorCode::MB_ENOREG If no such discrete inputs exists.
- * In this case a <b>ILLEGAL DATA ADDRESS</b> exception frame is sent
+ * In this case a <b>ILLEGAL DATA ADDRESS</b> exception frame is sent
* as a response.
* - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
* currently not available and the application dependent response