Skip to content

Commit

Permalink
fix when open samrt but using msh after run elf file the msh will down
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhuzhus authored and Rbb666 committed Jan 20, 2025
1 parent 680333f commit 9c16488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/drivers/serial/serial_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static rt_err_t _serial_ty_bypass(struct rt_serial_device* serial, char ch,void
rt_inline void _setup_serial(struct rt_serial_device* serial, lwp_tty_t tp,
struct serial_tty_context *softc)
{
rt_bypass_lower_register(serial, "tty",RT_BYPASS_PROTECT_LEVEL_1, _serial_ty_bypass,(void *)tp);
rt_bypass_lower_register(serial, "tty", RT_BYPASS_PROTECT_LEVEL_1, _serial_ty_bypass, (void *)tp);
}

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

LOG_D("%s", __func__);

_restore_serial(serial, tp, softc);
rt_bypass_lower_unregister(serial, RT_BYPASS_PROTECT_LEVEL_1);
rt_device_close(&serial->parent);
}

Expand Down

0 comments on commit 9c16488

Please sign in to comment.