fix: code format of serial.c and compile error in aarch64 context_gcc

This commit is contained in:
zhao maosheng 2024-04-02 15:43:50 +08:00 committed by Rbb666
parent e9133d5660
commit 4e7d13b2db
2 changed files with 13 additions and 16 deletions

View File

@ -1019,30 +1019,28 @@ static void _tc_flush(struct rt_serial_device *serial, int queue)
}
static inline int _termio_to_termios(const struct termio *termio,
struct termios *termios)
static inline int _termio_to_termios(const struct termio *termio, struct termios *termios)
{
termios->c_iflag = termio->c_iflag;
termios->c_oflag = termio->c_oflag;
termios->c_cflag = termio->c_cflag;
termios->c_lflag = termio->c_lflag;
termios->c_iflag = termio->c_iflag;
termios->c_oflag = termio->c_oflag;
termios->c_cflag = termio->c_cflag;
termios->c_lflag = termio->c_lflag;
termios->c_line = termio->c_line;
rt_memcpy(termios->c_cc, termio->c_cc, NCC);
return 0;
return 0;
}
static inline int _termios_to_termio(const struct termios *termios,
struct termio *termio)
static inline int _termios_to_termio(const struct termios *termios, struct termio *termio)
{
termio->c_iflag = (unsigned short)termios->c_iflag;
termio->c_oflag = (unsigned short)termios->c_oflag;
termio->c_cflag = (unsigned short)termios->c_cflag;
termio->c_lflag = (unsigned short)termios->c_lflag;
termio->c_line = termios->c_line;
rt_memcpy(termio->c_cc, termios->c_cc, NCC);
rt_memcpy(termio->c_cc, termios->c_cc, NCC);
return 0;
return 0;
}
#endif /* RT_USING_POSIX_TERMIOS */

View File

@ -20,11 +20,10 @@
#include "armv8.h"
#ifndef RT_USING_SMP
.bss
.align 3
rt_interrupt_from_thread: .comm 8, 8
rt_interrupt_to_thread: .comm 8, 8
rt_thread_switch_interrupt_flag: .comm 8, 8
.section .data
rt_interrupt_from_thread: .zero 8
rt_interrupt_to_thread: .zero 8
rt_thread_switch_interrupt_flag: .zero 8
#endif
.text