apps/modbus/mb_m.c: missing eMBMasterASCIIStart definition

Open
#635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start in apps/modbus/mb_m.c at eMBMasterInit and inspect the MB_ASCII_MASTER branch and its referenced ASCII callbacks. Build with MB_ASCII_MASTER enabled, then verify that the missing ASCII symbols and the unhandled master events no longer produce the reported compiler diagnostics.

Written by the indexing model from the issue text.

Description

(This issue was reported by user @klmchp at incubator-nuttx repository)

Error message as shown below when enabled MB_ASCII_MASTER:
mb_m.c: In function 'eMBMasterInit':
mb_m.c:176:33: error: 'eMBMasterASCIIStart' undeclared (first use in this function); did you mean 'eMBMasterRTUStart'?
176 | pvMBMasterFrameStartCur = eMBMasterASCIIStart;
| ^~~~~~~~~~~~~~~~~~~
| eMBMasterRTUStart
mb_m.c:176:33: note: each undeclared identifier is reported only once for each function it appears in
mb_m.c:177:32: error: 'eMBMasterASCIIStop' undeclared (first use in this function); did you mean 'eMBMasterRTUStop'?
177 | pvMBMasterFrameStopCur = eMBMasterASCIIStop;
| ^~~~~~~~~~~~~~~~~~
| eMBMasterRTUStop
mb_m.c:178:32: error: 'eMBMasterASCIISend' undeclared (first use in this function); did you mean 'eMBMasterRTUSend'?
178 | peMBMasterFrameSendCur = eMBMasterASCIISend;
| ^~~~~~~~~~~~~~~~~~
| eMBMasterRTUSend
mb_m.c:179:35: error: 'eMBMasterASCIIReceive' undeclared (first use in this function); did you mean 'eMBMasterRTUReceive'?
179 | peMBMasterFrameReceiveCur = eMBMasterASCIIReceive;
| ^~~~~~~~~~~~~~~~~~~~~
| eMBMasterRTUReceive
mb_m.c:181:39: error: 'xMBMasterASCIIReceiveFSM' undeclared (first use in this function); did you mean 'xMBMasterRTUReceiveFSM'?
181 | pxMBMasterFrameCBByteReceived = xMBMasterASCIIReceiveFSM;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| xMBMasterRTUReceiveFSM
mb_m.c:182:43: error: 'xMBMasterASCIITransmitFSM' undeclared (first use in this function); did you mean 'xMBMasterRTUTransmitFSM'?
182 | pxMBMasterFrameCBTransmitterEmpty = xMBMasterASCIITransmitFSM;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| xMBMasterRTUTransmitFSM
mb_m.c:183:38: error: 'xMBMasterASCIITimerT1SExpired' undeclared (first use in this function); did you mean 'xMBASCIITimerT1SExpired'?
183 | pxMBMasterPortCBTimerExpired = xMBMasterASCIITimerT1SExpired;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| xMBASCIITimerT1SExpired
mb_m.c:185:17: warning: implicit declaration of function 'eMBMasterASCIIInit'; did you mean 'eMBMasterTCPInit'? [-Wimplicit-function-declaration]
185 | eStatus = eMBMasterASCIIInit(ucPort, ulBaudRate, eParity);
| ^~~~~~~~~~~~~~~~~~
| eMBMasterTCPInit
mb_m.c: In function 'eMBMasterPoll':
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_PROCESS_SUCCESS' not handled in switch [-Wswitch]
301 | switch (eEvent)
| ^~~~~~
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_ERROR_RESPOND_TIMEOUT' not handled in switch [-Wswitch]
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_ERROR_RECEIVE_DATA' not handled in switch [-Wswitch]
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_ERROR_EXECUTE_FUNCTION' not handled in switch [-Wswitch]

Dominant language
C
Stars
465
Forks
782
Avg merge
3d 11h
Merged PRs (30d)
44

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/nuttx-apps

All issues in apache/nuttx-apps

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.