Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow ports to define included functions. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions modbus/include/mbconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,34 +95,54 @@ PR_BEGIN_EXTERN_C
#define MB_FUNC_OTHER_REP_SLAVEID_BUF ( 32 )

/*! \brief If the <em>Report Slave ID</em> function should be enabled. */
#define MB_FUNC_OTHER_REP_SLAVEID_ENABLED ( 1 )
#ifndef MB_FUNC_OTHER_REP_SLAVEID_ENABLED
#define MB_FUNC_OTHER_REP_SLAVEID_ENABLED ( 1 )
#endif

/*! \brief If the <em>Read Input Registers</em> function should be enabled. */
#define MB_FUNC_READ_INPUT_ENABLED ( 1 )
#ifndef MB_FUNC_READ_INPUT_ENABLED
#define MB_FUNC_READ_INPUT_ENABLED ( 1 )
#endif

/*! \brief If the <em>Read Holding Registers</em> function should be enabled. */
#define MB_FUNC_READ_HOLDING_ENABLED ( 1 )
#ifndef MB_FUNC_READ_HOLDING_ENABLED
#define MB_FUNC_READ_HOLDING_ENABLED ( 1 )
#endif

/*! \brief If the <em>Write Single Register</em> function should be enabled. */
#define MB_FUNC_WRITE_HOLDING_ENABLED ( 1 )
#ifndef MB_FUNC_WRITE_HOLDING_ENABLED
#define MB_FUNC_WRITE_HOLDING_ENABLED ( 1 )
#endif

/*! \brief If the <em>Write Multiple registers</em> function should be enabled. */
#define MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED ( 1 )
#ifndef MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED
#define MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED ( 1 )
#endif

/*! \brief If the <em>Read Coils</em> function should be enabled. */
#define MB_FUNC_READ_COILS_ENABLED ( 1 )
#ifndef MB_FUNC_READ_COILS_ENABLED
#define MB_FUNC_READ_COILS_ENABLED ( 1 )
#endif

/*! \brief If the <em>Write Coils</em> function should be enabled. */
#define MB_FUNC_WRITE_COIL_ENABLED ( 1 )
#ifndef MB_FUNC_WRITE_COIL_ENABLED
#define MB_FUNC_WRITE_COIL_ENABLED ( 1 )
#endif

/*! \brief If the <em>Write Multiple Coils</em> function should be enabled. */
#define MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED ( 1 )
#ifndef MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED
#define MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED ( 1 )
#endif

/*! \brief If the <em>Read Discrete Inputs</em> function should be enabled. */
#define MB_FUNC_READ_DISCRETE_INPUTS_ENABLED ( 1 )
#ifndef MB_FUNC_READ_DISCRETE_INPUTS_ENABLED
#define MB_FUNC_READ_DISCRETE_INPUTS_ENABLED ( 1 )
#endif

/*! \brief If the <em>Read/Write Multiple Registers</em> function should be enabled. */
#define MB_FUNC_READWRITE_HOLDING_ENABLED ( 1 )
#ifndef MB_FUNC_READWRITE_HOLDING_ENABLED
#define MB_FUNC_READWRITE_HOLDING_ENABLED ( 1 )
#endif

/*! @} */
#ifdef __cplusplus
Expand Down