#include "flash.h"
#include "elf.h"
#include "proxendian.h"
-#include "../include/usb_cmd.h"
+#include "usb_cmd.h"
void SendCommand(UsbCommand* txcmd);
void ReceiveCommand(UsbCommand* rxcmd);
{
UsbCommand c;
c.cmd = CMD_DEVICE_INFO;
- SendCommand(&c);
+ SendCommand(&c);
UsbCommand resp;
ReceiveCommand(&resp);
memset(block_buf, 0xFF, BLOCK_SIZE);
memcpy(block_buf, data, length);
- UsbCommand c;
+ UsbCommand c;
c.cmd = CMD_FINISH_WRITE;
c.arg[0] = address;
memcpy(c.d.asBytes, block_buf, length);
- SendCommand(&c);
+ SendCommand(&c);
return wait_for_ack();
}
// just reset the unit
int flash_stop_flashing(void) {
UsbCommand c = {CMD_HARDWARE_RESET};
- SendCommand(&c);
- msleep(100);
- return 0;
+ SendCommand(&c);
+ msleep(100);
+ return 0;
}