return PM3_SUCCESS on usart_writebuffer_sync, usb_write

This commit is contained in:
Philippe Teuwen
2019-04-22 22:58:45 +02:00
parent 9602e641e2
commit b0eef756c1
8 changed files with 33 additions and 33 deletions

View File

@@ -709,7 +709,7 @@ uint32_t usb_read_ng(uint8_t *data, size_t len) {
//* \fn usb_write
//* \brief Send through endpoint 2 (device to host)
//*----------------------------------------------------------------------------
int32_t usb_write(const uint8_t *data, const size_t len) {
int usb_write(const uint8_t *data, const size_t len) {
if (!len) return PM3_EINVARG;
if (!usb_check()) return PM3_EIO;
@@ -758,7 +758,7 @@ int32_t usb_write(const uint8_t *data, const size_t len) {
UDP_CLEAR_EP_FLAGS(AT91C_EP_IN, AT91C_UDP_TXCOMP);
while (pUdp->UDP_CSR[AT91C_EP_IN] & AT91C_UDP_TXCOMP) {};
return len;
return PM3_SUCCESS;
}
//*----------------------------------------------------------------------------