mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 03:44:30 +03:00
change USB for common files
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user