Browse Source

fix usb jump S

JY 4 months ago
parent
commit
d526073185
2 changed files with 6 additions and 1 deletions
  1. 5 0
      IAP_YMODEM_ATY.c
  2. 1 1
      IAP_YMODEM_ATY.h

+ 5 - 0
IAP_YMODEM_ATY.c

@@ -297,6 +297,11 @@ void Main_Cycle(void)
     Interface_PutString("\r\n\r\nS to start\r\n\r\n");
     while(1)
     {
+        if(hcdc->RxLength > 1024){
+            uint8_t t[1] = {0};
+            Interface_Receive(t, 1, 10);
+            continue; 
+        }
         if(1)
         {
             if(Interface_Receive(sKey, 2, IAP_S_TIME) == HAL_OK)

+ 1 - 1
IAP_YMODEM_ATY.h

@@ -47,7 +47,7 @@
 
 #ifndef IAP_S_TIME
 #define IAP_S_TIME RX_TIMEOUT
-//#define IAP_S_TIME 1000
+// #define IAP_S_TIME 1000
 #endif
 #ifndef IAP_3_TIME
 #define IAP_3_TIME 5000