| 256 | } |
| 257 | |
| 258 | static int serial_tty_param(struct lwp_tty *tp, struct termios *t) |
| 259 | { |
| 260 | struct serial_tty_context *softc = (struct serial_tty_context *)(tp->t_devswsoftc); |
| 261 | struct rt_serial_device *serial; |
| 262 | |
| 263 | RT_ASSERT(softc); |
| 264 | serial = softc->parent; |
| 265 | |
| 266 | if (!tty_opened(tp)) |
| 267 | { |
| 268 | /** |
| 269 | * skip configure on open since all configs are copied from the current |
| 270 | * configuration on device. So we don't bother to set it back to device |
| 271 | * again. |
| 272 | */ |
| 273 | return RT_EOK; |
| 274 | } |
| 275 | |
| 276 | cfsetispeed(t, t->__c_ispeed); |
| 277 | return rt_device_control(&(serial->parent), TCSETS, t); |
| 278 | } |
| 279 | |
| 280 | static struct lwp_ttydevsw serial_ttydevsw = { |
| 281 | .tsw_open = serial_tty_open, |
nothing calls this directly
no test coverage detected