mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-12 16:06:59 +00:00
More trailing whilespace removal
This commit is contained in:
parent
7d961b6c93
commit
b9cf7acb1a
285 changed files with 769 additions and 769 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -38,7 +38,7 @@ PR_BEGIN_EXTERN_C
|
|||
eMBException eMBFuncReportSlaveID( uint8_t * pucFrame, uint16_t * usLen );
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MB_FUNC_READ_INPUT_ENABLED
|
||||
#ifdef CONFIG_MB_FUNC_READ_INPUT_ENABLED
|
||||
eMBException eMBFuncReadInputRegister( uint8_t * pucFrame, uint16_t * usLen );
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ extern "C"
|
|||
#define cJSON_String 4
|
||||
#define cJSON_Array 5
|
||||
#define cJSON_Object 6
|
||||
|
||||
|
||||
#define cJSON_IsReference 256
|
||||
|
||||
#define cJSON_AddNullToObject(object,name) \
|
||||
cJSON_AddItemToObject(object, name, cJSON_CreateNull())
|
||||
#define cJSON_AddTrueToObject(object,name) \
|
||||
cJSON_AddItemToObject(object, name, cJSON_CreateTrue())cd
|
||||
cJSON_AddItemToObject(object, name, cJSON_CreateTrue())cd
|
||||
#define cJSON_AddFalseToObject(object,name) \
|
||||
cJSON_AddItemToObject(object, name, cJSON_CreateFalse())
|
||||
#define cJSON_AddNumberToObject(object,name,n) \
|
||||
|
|
@ -79,13 +79,13 @@ typedef struct cJSON
|
|||
* GetArraySize/GetArrayItem/GetObjectItem
|
||||
*/
|
||||
|
||||
struct cJSON *next,*prev;
|
||||
struct cJSON *next,*prev;
|
||||
|
||||
/* An array or object item will have a child pointer pointing to a chain
|
||||
* of the items in the array/object.
|
||||
*/
|
||||
|
||||
struct cJSON *child;
|
||||
struct cJSON *child;
|
||||
|
||||
int type; /* The type of the item, as above. */
|
||||
char *valuestring; /* The item's string, if type==cJSON_String */
|
||||
|
|
@ -155,7 +155,7 @@ cJSON *cJSON_GetObjectItem(cJSON *object, const char *string);
|
|||
*/
|
||||
|
||||
const char *cJSON_GetErrorPtr();
|
||||
|
||||
|
||||
/* These calls create a cJSON item of the appropriate type. */
|
||||
|
||||
cJSON *cJSON_CreateNull();
|
||||
|
|
@ -193,7 +193,7 @@ cJSON *cJSON_DetachItemFromArray(cJSON *array, int which);
|
|||
void cJSON_DeleteItemFromArray(cJSON *array, int which);
|
||||
cJSON *cJSON_DetachItemFromObject(cJSON *object, const char *string);
|
||||
void cJSON_DeleteItemFromObject(cJSON *object, const char *string);
|
||||
|
||||
|
||||
/* Update array items. */
|
||||
|
||||
void cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ struct httpd_cgi_call
|
|||
* This macro is used for declaring a HTTPD CGI function. This function is
|
||||
* then added to the list of HTTPD CGI functions with the httpd_cgi_register()
|
||||
* function.
|
||||
|
||||
|
||||
* Input Paramters:
|
||||
*
|
||||
* name The C variable name of the function
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ EXTERN int web_posts_strlen(FAR char **name, FAR char **value, int len);
|
|||
*
|
||||
* Returned Value:
|
||||
* 0: if the GET operation completed successfully;
|
||||
* -1: On a failure with errno set appropriately
|
||||
* -1: On a failure with errno set appropriately
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
* apps/include/netutils/xmlrpc.h
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2012 Max Holtzberg. All rights reserved.
|
||||
* Author: Max Holtzberg <mh@uvc.de>
|
||||
*
|
||||
|
|
@ -9,34 +9,34 @@
|
|||
* an-embeddable-lightweight-xml-rpc-server/184405364
|
||||
*
|
||||
* Copyright (c) 2002 Cogito LLC. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, is hereby granted without fee provided
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, is hereby granted without fee provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
* 3. Neither the name of Cogito LLC nor the names of its
|
||||
* contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior
|
||||
* 3. Neither the name of Cogito LLC nor the names of its
|
||||
* contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS'
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS'
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
|
|
@ -119,7 +119,7 @@ void nsh_initialize(void);
|
|||
* single an NSH instance that operates on stdin and stdout. This
|
||||
* function does not return.
|
||||
*
|
||||
* This function handles generic /dev/console character devices, or
|
||||
* This function handles generic /dev/console character devices, or
|
||||
* special USB console devices. The USB console requires some special
|
||||
* operations to handle the cases where the session is lost when the
|
||||
* USB device is unplugged and restarted when the USB device is plugged
|
||||
|
|
@ -133,7 +133,7 @@ void nsh_initialize(void);
|
|||
* This function does not normally return. exit() is usually called to
|
||||
* terminate the NSH session. This function will return in the event of
|
||||
* an error. In that case, a nonzero value is returned (EXIT_FAILURE=1).
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nsh_consolemain(int argc, char *argv[]);
|
||||
|
|
@ -153,7 +153,7 @@ int nsh_consolemain(int argc, char *argv[]);
|
|||
* Returned Values:
|
||||
* The task ID of the Telnet daemon was successfully started. A negated
|
||||
* errno value will be returned on failure.
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nsh_telnetstart(void);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
#define IFD_TAG_IMAGEWIDTH 256 /* ImageLength, SHORT or LONG (Required) */
|
||||
#define IFD_TAG_IMAGELENGTH 257 /* ImageWidth, SHORT or LONG (Required) */
|
||||
#define IFD_TAG_BITSPERSAMPLE 258 /* BitsPerSample, SHORT (Required
|
||||
* in greyscale and pallette-color image files) */
|
||||
* in greyscale and pallette-color image files) */
|
||||
#define IFD_TAG_COMPRESSION 259 /* Compression, SHORT (Required) */
|
||||
# define TAG_COMP_NONE 1 /* No compression */
|
||||
# define TAG_COMP_CCITT 2 /* CCITT Group 3 1-Dimensional Modified Huffman
|
||||
|
|
@ -253,7 +253,7 @@ struct tiff_ifdentry_s
|
|||
#define SIZEOF_IFD_ENTRY 12
|
||||
|
||||
/************************************************************************************/
|
||||
/* Structures needed to interface with the TIFF file creation library )and also
|
||||
/* Structures needed to interface with the TIFF file creation library )and also
|
||||
* structures used only internally by the TIFF file creation library).
|
||||
*/
|
||||
|
||||
|
|
@ -349,7 +349,7 @@ struct tiff_info_s
|
|||
off_t tmp2size; /* Current size of tmpfile2 */
|
||||
|
||||
/* Points to an internal constant structure of file offsets */
|
||||
|
||||
|
||||
FAR const struct tiff_filefmt_s *filefmt;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue