gpio-cdev:Linux GPIO字符设备API的Rust接口(devgpiochip ...)

时间:2021-05-13 19:18:44
【文件属性】:
文件名称:gpio-cdev:Linux GPIO字符设备API的Rust接口(devgpiochip ...)
文件大小:40KB
文件格式:ZIP
更新时间:2021-05-13 19:18:44
linux rust embedded gpio gpio-character-device gpio-cdev rust-gpio-cdev是一个Rust库/板条箱,提供对访问。 此API(已通过Linux v4.4进行了稳定化)将旧sysfs接口与GPIO弃用,该接口计划在2020年之后(即将到来)从上游内核中删除。 如果您不需要定位较早的内核,则鼓励使用此API,而不要使用此板条箱的前身使用的sysfs API。 有关差异的更多信息,请参见。 安装 将以下内容添加到您的Cargo.toml中 [dependencies] gpio-cdev = "0.4" 请注意以下功能可用: async-tokio :添加一个Stream接口,以在tokio运行时中的异步代码中使用GPIO事件。 例子 还有其他几个。 读取状态 use gpio_cdev :: {Chip, LineRequestFlags}; // Read the state of GPIO4 on a rasp
【文件预览】:
gpio-cdev-master
----.gitignore(32B)
----src()
--------async_tokio.rs(3KB)
--------ffi.rs(3KB)
--------errors.rs(3KB)
--------lib.rs(33KB)
----.travis.yml(4KB)
----CODE_OF_CONDUCT.md(4KB)
----CHANGELOG.md(2KB)
----Cargo.toml(1KB)
----.github()
--------CODEOWNERS(31B)
--------bors.toml(157B)
----examples()
--------driveoutput.rs(2KB)
--------async_tokio.rs(1KB)
--------tit_for_tat.rs(2KB)
--------gpioevents.rs(1KB)
--------lsgpio.rs(3KB)
--------readall.rs(1017B)
--------readinput.rs(1KB)
--------blinky.rs(2KB)
--------multiread.rs(1KB)
--------monitor.rs(3KB)
--------multioutput.rs(2KB)
----LICENSE-MIT(1023B)
----README.md(9KB)
----ci()
--------install.sh(1KB)
--------before_deploy.sh(693B)
--------script.sh(562B)
--------before_deploy.ps1(576B)
----LICENSE-APACHE(11KB)

网友评论