Skip to content

Commit 9c16488

Browse files
zhuzhuzhusRbb666
authored andcommitted
fix when open samrt but using msh after run elf file the msh will down
1 parent 680333f commit 9c16488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/drivers/serial/serial_tty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static rt_err_t _serial_ty_bypass(struct rt_serial_device* serial, char ch,void
131131
rt_inline void _setup_serial(struct rt_serial_device* serial, lwp_tty_t tp,
132132
struct serial_tty_context *softc)
133133
{
134-
rt_bypass_lower_register(serial, "tty",RT_BYPASS_PROTECT_LEVEL_1, _serial_ty_bypass,(void *)tp);
134+
rt_bypass_lower_register(serial, "tty", RT_BYPASS_PROTECT_LEVEL_1, _serial_ty_bypass, (void *)tp);
135135
}
136136

137137
rt_inline void _restore_serial(struct rt_serial_device *serial, lwp_tty_t tp,
@@ -232,7 +232,7 @@ static void serial_tty_close(struct lwp_tty *tp)
232232

233233
LOG_D("%s", __func__);
234234

235-
_restore_serial(serial, tp, softc);
235+
rt_bypass_lower_unregister(serial, RT_BYPASS_PROTECT_LEVEL_1);
236236
rt_device_close(&serial->parent);
237237
}
238238

0 commit comments

Comments
 (0)