Мастер: коллбек вызывается и при таймауте

В коллбеке можно понять статус реквеста по hmodbus->RS_STATUS
This commit is contained in:
2025-11-05 16:36:44 +03:00
parent 5bbbbde3e6
commit 52143ce07c
4 changed files with 47 additions and 18 deletions

View File

@@ -115,6 +115,10 @@ static int dummy;
#ifndef RS_USER_VARS_NUMB
#define RS_USER_VARS_NUMB 0
#endif
#ifndef local_time
#define local_time() uwTick
#endif
/** @endcond */
@@ -141,9 +145,10 @@ typedef enum // RS_StatusTypeDef
/*0x03*/ RS_ABORTED,
/*0x04*/ RS_BUSY,
/*0x05*/ RS_SKIP,
/*0x06*/ RS_TIMEOUT,
/*0x06*/ RS_COLLECT_MSG_ERR,
/*0x07*/ RS_PARSE_MSG_ERR,
/*0x07*/ RS_COLLECT_MSG_ERR,
/*0x08*/ RS_PARSE_MSG_ERR,
// reserved values
// /*0x00*/ RS_UNKNOWN_ERR = 0x00, ///< reserved for case, if no one error founded (nothing changed response from zero)