diff --git a/core/src/usart.c b/core/src/usart.c index 2a6bcb3..baac6f7 100644 --- a/core/src/usart.c +++ b/core/src/usart.c @@ -79,16 +79,21 @@ int usart_write (uint8_t _usart,int ch){ }; int usart_tx (uint8_t usart,char *b,int size){ - int n,r; + int n,r, tries; + tries = 10; for (n=0;n= 0){ - return ESUCCESS; + for (r=0;r= 0){ + b++; + break; }; + if(r == tries - 1) { + return -EFAIL; + } wait_ms(1); }; }; - return -EFAIL; + return ESUCCESS; };