change USB for common files

This commit is contained in:
Edward Emelianov
2023-06-13 19:49:35 +03:00
parent 54155fdca9
commit 00913a7e80
47 changed files with 1558 additions and 1249 deletions

View File

@@ -72,17 +72,20 @@ void usart_putchar(const char ch){
tbuf[tbufno][odatalen[tbufno]++] = ch;
}
void usart_send(const char *str){
int usart_send(const char *str){
int l = 0;
while(*str){
if(odatalen[tbufno] == UARTBUFSZO){
transmit_tbuf();
continue;
}
tbuf[tbufno][odatalen[tbufno]++] = *str++;
++l;
}
return l;
}
void newline(){
void usart_newline(){
usart_putchar('\n');
transmit_tbuf();
}