RT-Thread / RT-Thread/rt-thread
使用posix termios进行串口设置时的一些问题
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
在使用posix termios进行串口设置时,使用TCSETA进行串口配置变更,在如下位置获取了当前串口的config项,在本次配置流程中可以确保设置为正确的期望状态,但是对该config的修改并未作用到rtt中的串口控制结构体的config中,其还保留了旧配置参数,导致在再使用TCGETA时获取的为旧配置参数,即导致了串口配置参数与实际状态的分离,是否应在该处取指针来直接将修改作用至串口控制结构体中的config上?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at components/drivers/serial/serial.c around line 1070 and trace how TCSETA reads and updates the serial configuration. Check the subsequent TCGETA path; the work is done when it reports the current configuration rather than stale parameters after a successful change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100