Compare commits
No commits in common. "master" and "master" have entirely different histories.
|
@ -79,21 +79,16 @@ int usart_write (uint8_t _usart,int ch){
|
||||||
};
|
};
|
||||||
|
|
||||||
int usart_tx (uint8_t usart,char *b,int size){
|
int usart_tx (uint8_t usart,char *b,int size){
|
||||||
int n,r, tries;
|
int n,r;
|
||||||
tries = 10;
|
|
||||||
for (n=0;n<size;n++){
|
for (n=0;n<size;n++){
|
||||||
for (r=0;r<tries;r++){
|
for (r=0;r<10;r++){
|
||||||
if (usart_write( usart, *b) >= 0){
|
if (usart_write( usart, *(b++)) >= 0){
|
||||||
b++;
|
return ESUCCESS;
|
||||||
break;
|
|
||||||
};
|
};
|
||||||
if(r == tries - 1) {
|
|
||||||
return -EFAIL;
|
|
||||||
}
|
|
||||||
wait_ms(1);
|
wait_ms(1);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
return ESUCCESS;
|
return -EFAIL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue