diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-04-07 15:01:39 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-04-07 15:01:39 -0600 |
commit | 9eb5c1d02c305de6db0b4a23db182b48a2171632 (patch) | |
tree | dbfe099d7f25ea8d6f83d51e24af92bcda5be7aa /apps/modbus/ascii | |
parent | b99a64f25c360dbfc2f0007c669cd9bfa2a25e3d (diff) | |
download | px4-nuttx-9eb5c1d02c305de6db0b4a23db182b48a2171632.tar.gz px4-nuttx-9eb5c1d02c305de6db0b4a23db182b48a2171632.tar.bz2 px4-nuttx-9eb5c1d02c305de6db0b4a23db182b48a2171632.zip |
Modbus: Change to more header files to make them a little more consistent with Nuttx coding stanards. Still not very close
Diffstat (limited to 'apps/modbus/ascii')
-rw-r--r-- | apps/modbus/ascii/mbascii.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/apps/modbus/ascii/mbascii.h b/apps/modbus/ascii/mbascii.h index 983383d03..f4c901a4b 100644 --- a/apps/modbus/ascii/mbascii.h +++ b/apps/modbus/ascii/mbascii.h @@ -1,5 +1,7 @@ -/* - * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU. +/**************************************************************************** + * apps/modbus/ascii/mbascii.h + * + * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * Copyright (c) 2006 Christian Walter <wolti@sil.at> * All rights reserved. * @@ -25,32 +27,35 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * File: $Id: mbascii.h,v 1.8 2006/12/07 22:10:34 wolti Exp $ - */ + ****************************************************************************/ -#ifndef _MB_ASCII_H -#define _MB_ASCII_H +#ifndef __APPS_MODBUS_ASCII_MBASCII_H +#define __APPS_MODBUS_ASCII_MBASCII_H #ifdef __cplusplus PR_BEGIN_EXTERN_C #endif -#ifdef CONFIG_MB_ASCII_ENABLED -eMBErrorCode eMBASCIIInit( uint8_t slaveAddress, uint8_t ucPort, - speed_t ulBaudRate, eMBParity eParity ); -void eMBASCIIStart( void ); -void eMBASCIIStop( void ); +/**************************************************************************** + * Global Function Prototypes + ****************************************************************************/ -eMBErrorCode eMBASCIIReceive( uint8_t * pucRcvAddress, uint8_t ** pucFrame, - uint16_t * pusLength ); -eMBErrorCode eMBASCIISend( uint8_t slaveAddress, const uint8_t * pucFrame, - uint16_t usLength ); -bool xMBASCIIReceiveFSM( void ); -bool xMBASCIITransmitFSM( void ); -bool xMBASCIITimerT1SExpired( void ); +#ifdef CONFIG_MB_ASCII_ENABLED +eMBErrorCode eMBASCIIInit(uint8_t slaveAddress, uint8_t ucPort, + speed_t ulBaudRate, eMBParity eParity); +void eMBASCIIStart(void); +void eMBASCIIStop(void); +eMBErrorCode eMBASCIIReceive(uint8_t *pucRcvAddress, uint8_t **pucFrame, + uint16_t * pusLength); +eMBErrorCode eMBASCIISend(uint8_t slaveAddress, const uint8_t *pucFrame, + uint16_t usLength); +bool xMBASCIIReceiveFSM(void); +bool xMBASCIITransmitFSM(void); +bool xMBASCIITimerT1SExpired(void); #endif #ifdef __cplusplus PR_END_EXTERN_C #endif -#endif + +#endif /* __APPS_MODBUS_ASCII_MBASCII_H */ |