(int)recvlen, (int)len);
/* Retry this commad */
- *((ulong *) usbd->tx_data) = 1;
+ *((ulong *) usbd->tx_data) = STATUS_RETRY;
} else
- *((ulong *) usbd->tx_data) = 0;
+ *((ulong *) usbd->tx_data) = STATUS_DONE;
usbd->send_data(usbd->tx_data, usbd->tx_len);
return 1;
usbd_phone_down();
- *((ulong *) usbd->tx_data) = 0;
+ *((ulong *) usbd->tx_data) = STATUS_DONE;
usbd->send_data(usbd->tx_data, usbd->tx_len);
return 1;
if (ret) {
/* Retry this commad */
- *((ulong *) usbd->tx_data) = 1;
+ *((ulong *) usbd->tx_data) = STATUS_RETRY;
usbd->send_data(usbd->tx_data, usbd->tx_len);
return 1;
} else
- *((ulong *) usbd->tx_data) = 0;
+ *((ulong *) usbd->tx_data) = STATUS_DONE;
/* Write image success -> Report status */
usbd->send_data(usbd->tx_data, usbd->tx_len);
#endif
#define COMMAND_PROGRESS 230
+/* status definition */
+enum {
+ STATUS_DONE = 0,
+ STATUS_RETRY,
+ STATUS_ERROR,
+};
+
/*
* USB Downloader Operations
* All functions and valuable are mandatory