diff --git a/src/shellmatta.c b/src/shellmatta.c index 7ad8ea6..d13d7d4 100644 --- a/src/shellmatta.c +++ b/src/shellmatta.c @@ -401,6 +401,26 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle, ret = cmdRet; } } + /** -# call continuous function even if there is no data */ + else if((0u != size) && (NULL != inst->continuousCmd)) + { + /** -# just call the function until it is not busy anymore */ + cmdRet = inst->continuousCmd->cmdFct(handle, inst->buffer, size); + + if(SHELLMATTA_CONTINUE == cmdRet) + { + ret = cmdRet; + } + else if(SHELLMATTA_BUSY == cmdRet) + { + inst->busyCmd = inst->continuousCmd; + inst->continuousCmd = NULL; + } + else + { + utils_terminateInput(inst); + } + } /** -# process byte wise */ for (; (inst->byteCounter < size) && (NULL == inst->busyCmd); inst->byteCounter++)