diff options
| author | zhujiale <[email protected]> | 2025-01-15 14:07:21 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2025-01-20 15:09:02 +0800 |
| commit | 9c164882e8bf301daafd3a357793af85af26169b (patch) | |
| tree | 71e197695e85ab3d6e5adb36b2a231ef69bbdd79 /components | |
| parent | 680333fc18b41d24c3da9ae736af9471aa03ff04 (diff) | |
fix when open samrt but using msh after run elf file the msh will down
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/serial/serial_tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/serial/serial_tty.c b/components/drivers/serial/serial_tty.c index dae668a2ef..b5c4549da2 100644 --- a/components/drivers/serial/serial_tty.c +++ b/components/drivers/serial/serial_tty.c @@ -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, @@ -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); } |
