Harmonize usb_write & usart_writebuffer_sync return values
This commit is contained in:
@@ -1203,7 +1203,7 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
size_t len = MIN((numofbytes - i), USB_CMD_DATA_SIZE);
|
||||
int16_t result = reply_old(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K, i, len, BigBuf_get_traceLen(), mem + startidx + i, len);
|
||||
if (result <= 0)
|
||||
Dbprintf("transfer to client failed :: | bytes between %d - %d (%d)", i, i + len, len);
|
||||
Dbprintf("transfer to client failed :: | bytes between %d - %d (%d) | result: %d", i, i + len, len, result);
|
||||
}
|
||||
// Trigger a finish downloading signal with an ACK frame
|
||||
// iceman, when did sending samplingconfig array got attached here?!?
|
||||
@@ -1247,7 +1247,7 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
len = MIN((numofbytes - i), USB_CMD_DATA_SIZE);
|
||||
int16_t result = reply_old(CMD_DOWNLOADED_EML_BIGBUF, i, len, 0, mem + startidx + i, len);
|
||||
if (result <= 0)
|
||||
Dbprintf("transfer to client failed :: | bytes between %d - %d (%d)", i, i + len, len);
|
||||
Dbprintf("transfer to client failed :: | bytes between %d - %d (%d) | result: %d", i, i + len, len, result);
|
||||
}
|
||||
// Trigger a finish downloading signal with an ACK frame
|
||||
reply_old(CMD_ACK, 1, 0, 0, 0, 0);
|
||||
|
||||
@@ -222,8 +222,9 @@ void iClass_Clone(uint8_t startblock, uint8_t endblock, uint8_t *data);
|
||||
void iClass_ReadCheck(uint8_t blockno, uint8_t keytype);
|
||||
|
||||
// cmd.h
|
||||
int16_t reply_old(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
||||
int16_t reply_ng(uint16_t cmd, int16_t status, uint8_t *data, size_t len);
|
||||
int32_t reply_old(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
||||
int32_t reply_mix(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
||||
int32_t reply_ng(uint16_t cmd, int16_t status, uint8_t *data, size_t len);
|
||||
int16_t receive_ng(PacketCommandNG *rx);
|
||||
|
||||
// util.h
|
||||
|
||||
Reference in New Issue
Block a user