|
|
@@ -36,11 +36,13 @@
|
|
|
/******************************* For user *************************************/
|
|
|
uint8_t EmptyBuf[1] = {0};
|
|
|
|
|
|
+#ifdef IAP_YMODEM_ATY_USB
|
|
|
USBD_CDC_HandleTypeDef* hcdc;
|
|
|
uint32_t ucdcRcvLength = 0;
|
|
|
uint8_t ucdcRcvOverFlag = 1;
|
|
|
uint32_t ucdcRcvLastTime = 0;
|
|
|
uint8_t ucdcRcvBuffer[APP_RX_DATA_SIZE] = {0};
|
|
|
+#endif
|
|
|
|
|
|
void All_Reset(void)
|
|
|
{
|
|
|
@@ -92,6 +94,7 @@ void Interface_Clean(void)
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
+#ifdef IAP_YMODEM_ATY_USB
|
|
|
void PUT_IN_CDC_Receive_FS(uint8_t* Buf, uint32_t* Len)
|
|
|
{
|
|
|
if(ucdcRcvOverFlag == 1){ // new start
|
|
|
@@ -119,7 +122,7 @@ void PUT_IN_CDC_Receive_FS(uint8_t* Buf, uint32_t* Len)
|
|
|
// USBD_CDC_ReceivePacket(&hUsbDeviceFS);
|
|
|
// return (USBD_OK);
|
|
|
}
|
|
|
-
|
|
|
+#endif
|
|
|
|
|
|
uint32_t timeoutCount = 0;
|
|
|
uint32_t timeoutFinal = 100;
|
|
|
@@ -297,11 +300,13 @@ void Main_Cycle(void)
|
|
|
Interface_PutString("\r\n\r\nS to start\r\n\r\n");
|
|
|
while(1)
|
|
|
{
|
|
|
+ #ifdef IAP_YMODEM_ATY_USB
|
|
|
if(hcdc->RxLength > 1024){
|
|
|
uint8_t t[1] = {0};
|
|
|
Interface_Receive(t, 1, 10);
|
|
|
continue;
|
|
|
}
|
|
|
+ #endif
|
|
|
if(1)
|
|
|
{
|
|
|
if(Interface_Receive(sKey, 2, IAP_S_TIME) == HAL_OK)
|