-
Notifications
You must be signed in to change notification settings - Fork 350
新增74HC165驱动 #1893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
新增74HC165驱动 #1893
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| menuconfig PKG_USING_IC74HC165 | ||
| bool "ic74hc165: 74HC165 GPIO/SPI 驱动" | ||
| depends on RT_USING_COMPONENTS_INIT | ||
| help | ||
| 使用 GPIO 或 SPI 模式读取 74HC165 输入数据的驱动软件包 | ||
|
|
||
| if PKG_USING_IC74HC165 | ||
|
|
||
| choice | ||
| prompt "通信模式选择" | ||
| default PKG_IC74HC165_MODE_GPIO | ||
| help | ||
| 选择使用 GPIO 模拟方式 或 SPI 外设方式驱动 74165 | ||
|
|
||
| config PKG_IC74HC165_MODE_GPIO | ||
| bool "GPIO 模拟模式" | ||
|
|
||
| config PKG_IC74HC165_MODE_SPI | ||
| bool "SPI 硬件模式" | ||
| endchoice | ||
|
|
||
| config PKG_IC74HC165_SAMPLE | ||
| bool "启用示例代码(sample/sample.c)" | ||
| default y | ||
|
|
||
| config IC74HC165_NODE_COUNT | ||
| int "节点数量(74HC165 串联芯片数)" | ||
| default 1 | ||
|
|
||
| config PKG_IC74HC165_USE_CLKINH | ||
| bool "启用 CLK_INH(CE)引脚控制功能" | ||
| default y | ||
|
|
||
| # SPI 专属配置 | ||
| if PKG_IC74HC165_MODE_SPI | ||
|
|
||
| config PKG_IC74HC165_SPI_BUS_NAME | ||
| string "SPI 总线名称" | ||
| default "spi1" | ||
| help | ||
| SPI 总线名,例如 spi1、spi2,必须在系统中存在 | ||
|
|
||
| config PKG_IC74HC165_SPI_DEV_NAME | ||
| string "SPI 设备名称" | ||
| default "spi10" | ||
| help | ||
| SPI 设备逻辑名称,推荐使用 spi1x 结构 | ||
|
|
||
| endif # PKG_IC74HC165_MODE_SPI | ||
|
|
||
| choice | ||
| prompt "版本选择" | ||
| help | ||
| 选择使用的 ic74hc165 软件包版本 | ||
|
|
||
| config PKG_USING_IC74HC165_LATEST | ||
| bool "latest version (main branch)" | ||
| endchoice | ||
|
|
||
| config PKG_IC74HC165_VER | ||
| string | ||
| default "latest" if PKG_USING_IC74HC165_LATEST | ||
|
|
||
| config PKG_IC74HC165_PATH | ||
| string | ||
| default "/packages/peripherals/ic74hc165" | ||
|
|
||
| endif # PKG_USING_IC74HC165 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "name": "ic74hc165", | ||
| "description": "74HC165 GPIO/SPI driver for RT-Thread 4.x", | ||
| "description_zh": "用于RT-Thread 的74HC165串行输入并行输出芯片驱动,支持GPIO与SPI两种模式", | ||
| "enable": "PKG_USING_IC74HC165", | ||
| "keywords": [ | ||
| "74hc165", | ||
| "gpio", | ||
| "spi", | ||
| "shift-register" | ||
| ], | ||
| "category": "peripherals", | ||
| "author": { | ||
| "name": "godmial", | ||
| "email": "[email protected]", | ||
| "github": "godmial" | ||
| }, | ||
| "license": "Apache-2.0", | ||
| "repository": "https://github.com/godmial/ic74hc165.git", | ||
| "icon": "https://raw.githubusercontent.com/godmial/sean_ws2812b/main/icon.png", | ||
| "homepage": "https://github.com/godmial/ic74hc165#readme", | ||
| "doc": "https://github.com/godmial/ic74hc165#readme", | ||
| "site": [ | ||
| { | ||
| "version": "latest", | ||
| "URL": "https://github.com/godmial/ic74hc165.git", | ||
| "filename": "ic74hc165.zip", | ||
| "VER_SHA": "main" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.