feat: usart retarget

This commit is contained in:
2025-03-20 02:35:29 +08:00
parent f515d5fa96
commit 05dc5e3f53
5 changed files with 180 additions and 33 deletions

View File

@ -89,33 +89,33 @@ __attribute__((weak)) int _write(int file, char *ptr, int len)
return len;
}
int _close(int file)
{
(void)file;
return -1;
}
int _fstat(int file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _isatty(int file)
{
(void)file;
return 1;
}
int _lseek(int file, int ptr, int dir)
{
(void)file;
(void)ptr;
(void)dir;
return 0;
}
// int _close(int file)
// {
// (void)file;
// return -1;
// }
//
//
// int _fstat(int file, struct stat *st)
// {
// (void)file;
// st->st_mode = S_IFCHR;
// return 0;
// }
//
// int _isatty(int file)
// {
// (void)file;
// return 1;
// }
//
// int _lseek(int file, int ptr, int dir)
// {
// (void)file;
// (void)ptr;
// (void)dir;
// return 0;
// }
int _open(char *path, int flags, ...)
{