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

@@ -129,7 +129,7 @@ uint32_t usart_read_ng(uint8_t *data, size_t len) {
}
// transfer from device to client
inline int32_t usart_writebuffer_sync(uint8_t *data, size_t len) {
inline int usart_writebuffer_sync(uint8_t *data, size_t len) {
// Wait for current PDC bank to be free
// (and check next bank too, in case there will be a usart_writebuffer_async)
@@ -139,7 +139,7 @@ inline int32_t usart_writebuffer_sync(uint8_t *data, size_t len) {
// Wait until finishing all transfers to make sure "data" buffer can be discarded
// (if we don't wait here, bulk send as e.g. "hw status" will fail)
while (pUS1->US_TNCR || pUS1->US_TCR) {};
return len;
return PM3_SUCCESS;
}
void usart_init(void) {