|
@@ -139,7 +139,7 @@ static shellmatta_retCode_t shellmatta_processDataInt(shellmatta_handle_t ha
|
|
|
if (yModemState == WAIT_FOR_START)
|
|
|
{
|
|
|
/** -# explicitly reset ymodem with cancel, if it was active */
|
|
|
- // shellmatta_ymodem_reset(handle, true);
|
|
|
+ shellmatta_ymodem_reset(handle, true);
|
|
|
}
|
|
|
}
|
|
|
ret = SHELLMATTA_OK;
|
|
@@ -957,6 +957,25 @@ uint8_t shellmatta_ymodem( shellmatta_handle_t handle,
|
|
|
void shellmatta_ymodem_end(shellmatta_handle_t handle, bool doCancel)
|
|
|
{
|
|
|
shellmatta_ymodem_reset(handle, doCancel);
|
|
|
+ /* clear any possibly leftover inputs */
|
|
|
+ utils_clearInput((shellmatta_instance_t*)handle);
|
|
|
+}
|
|
|
+
|
|
|
+void shellmatta_ymodem_set_enable(bool doEnable)
|
|
|
+{
|
|
|
+ if (doEnable)
|
|
|
+ {
|
|
|
+ shellmatta_ymodem_enable();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ shellmatta_ymodem_disable();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+bool shellmatta_ymodem_is_active(void)
|
|
|
+{
|
|
|
+ return shellmatta_ymodem_get_current_datatype() != YMODEM_NONE;
|
|
|
}
|
|
|
|
|
|
/** @} */
|