CHG: appmain now calls cmd_recieve as it should

CHG: flasher -  removed unneeded parameter to function
CHG: flasher - increased limit to fpga-files that can be loaded
FIX: main client,  wrong windows define fixed.
CHG: device side - recieve usb command does not always get 544 bytes.  usb packages can be incomplete.
CHG: usb_cdc.c also got piwi's changes.
CHG: uart_posix.c removed a debug value
CHG: uart_win32.c clean up.
This commit is contained in:
iceman1001 2017-10-17 20:58:17 +02:00
commit 16028f7d33
9 changed files with 279 additions and 252 deletions

View file

@ -41,11 +41,14 @@ bool cmd_receive(UsbCommand* cmd) {
// Try to retrieve the available command frame
size_t rxlen = usb_read((byte_t*)cmd, sizeof(UsbCommand));
// Check if the transfer was complete
if (rxlen != sizeof(UsbCommand)) return false;
// (iceman) this check is wrong. Since USB can send packages which is not sizeof(usbcommand) 544 bytes.
// hence, I comment it out
// Check if the transfer was complete
//if (rxlen != sizeof(UsbCommand)) return false;
// Received command successfully
return true;
//return true;
return (rxlen);
}
bool cmd_send(uint32_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* data, size_t len) {