如何在Windows 8中读取GPIO引脚(How to read GPIO pins in Windows 8)

编程入门 行业动态 更新时间:2024-10-19 04:31:53
如何在Windows 8中读取GPIO引脚(How to read GPIO pins in Windows 8)

我必须读取特定主板(Jetway JNF9F)中的GPIO引脚。 从文档中我有一个关于要读取的寄存器地址的线索,但我只是不知道如何。

在我的研究中,我发现我必须编写一个内核模式驱动程序,它将与GpioClx通信(使用Windows 8不是问题)。 据我所知,GpioClx将被我不想写的应用程序查询。 一个参考

这种方法是否正确? 有更简单的方法吗?

// ===============================================

Obs:我的应用程序是什么:需要不断观察2个GPIO引脚的C ++软件。 当这些引脚的值发生变化时,必须采取措施(采取打印屏幕等)。 读取GPIO的软件不得要求管理员权限 - 但必须以某种方式(可能由驱动程序)将这些引脚设置为输入模式。

Obs2:我联系了制造商,他们说:“哦,非常简单,你只需阅读登记册。再见。” 他们还提供了一个.dll示例代码。 我使用这个.dll实现了一个解决方案,但.dll加载需要管理员权限 - 所以我不能使用它。

提前致谢

I have to read a GPIO pin in a specific motherboard (Jetway JNF9F). From the documentation I have a clue about the register address to read, but I just don't know how to.

In my research I found that I have to write a Kernel Mode driver, which will talk to GpioClx (using windows 8 is not an issue). GpioClx will, as I understand, be queried by the application I wan't to write. One reference

Is this approach correct? Is there a simpler way of doing this?

//===============================================

Obs: What my application is: a C++ software that needs to constantly watch 2 GPIO pins. When the value of those pins change, an action has to be taken (take a printscreen, or whatever). This software, reading the GPIO, must not ask for admin rights - but those pins have to be set somehow (may be by the driver) to input mode.

Obs2: I contacted the manufacturer and they said: "Oh, its very simple, you just have to read the register. Goodbye." They also gave a .dll an sample code. I've implemented a solution using this .dll, but the .dll loading requires admin rights - so I can't use it.

Thanks in advance

最满意答案

我认为编写设备驱动程序几乎是实现所需内容的唯一方法,如果您需要读取和写入硬件寄存器。 毕竟,这就是设备驱动程序的用途。

I think writing a device driver is pretty much the only way to accomplish what you want if you need to read and write to hardware registers. After all, that's what a device driver is there for.

更多推荐

本文发布于:2023-08-02 19:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1379621.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:引脚   如何在   Windows   GPIO   read

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!