RT-Thread / RT-Thread/rt-thread
[Feature] STM32的drv_hard_i2c缺少一个设置I2c速度的接口
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
Describe problem solved by the proposed feature
就像UART一样,在应用层通过name找到设备之后,可以通过config来设置uart的属性;
目前的drv_hard_i2c中缺少这个接口,所以无法从上层来设置I2c的速度,而原始速度只有100khz;
Describe your preferred solution
所以希望在drv_hard_i2c中补充这个config接口,因为内核的ops中就是有i2c_bus_control的接口的;
Describe possible alternatives
如果直接修改drv_hard_i2c里面的参数,把100k改掉,这样的方式还是不够优雅;
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 by locating the STM32 drv_hard_i2c implementation and compare its device configuration path with the UART configuration path. Trace the kernel i2c_bus_control operation and determine how an application-level config should pass the requested bus speed. Done means an I2C device found by name can change speed through config instead of being limited to 100 kHz.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100