This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux/processor-SDK-AM335X:USB 串行端口 IO 控制

Guru**** 2595260 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/642979/linux-processor-sdk-am335x-usb-serial-port-io-control

器件型号:PROCESSOR-SDK-AM335X

工具/软件:Linux

您好!

我尝试运行以下代码:

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
//#define serial_port_base 159 //4 compot 或9F (dmesg ttys4中的 IRQ)或159

(使用命名空间 std);

int main (int argc、char ** argv)
{
/if (IOPL(3))
}{
perror ("IOPL failed");return 0;
}*/
for (int i=0;I = 0;if (i+


)/i+(i+)





;(i+)/iepe+(if (i+)/i+)/iepeepe+(i+);(if (i+)/ipere+(i+)/i+)/iopere+(i+)
printf ("port #%d:OK\n"、i);

if (iperm (i、1、0))
{
perror ("iperm"); EXIT (1);
}
usleep(100000);
}
EXIT (0);
} 

(用于编译的 g++-O2 -o 示例 main.cpp)

在 TI Linux RT 上、但库中没有一个函数无法返回"成功"。  

在虚拟 Ununtu 上、我可以访问所有端口、但在 Linux AM335x-EVM 上、我只能看到"未找到器件"

如何正确地直接访问端口、是否可能? 或者、IT 库可能无法在我们的 Linux 上运行? 他支持他吗?

Linux AM335x-EVM 4.4.4.3.32-rt41-ge26c84b0ac #20挤占 RT Tue Jul 25 11:15:33 MSK 2017 armv7l GNU/Linux。

任何评论都将不胜感激
此致、
漂移

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    软件团队已收到通知。 他们将在这里作出回应。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我不确定 POST 主题中的 USB 串行端口是如何相关的、但我认为您描述的问题是意料之中的。 它是 x86和 ARM 之间的体系结构差异。 ARM 不提供端口 IO。 您可以在虚拟 Ubuntu 和 AM335x 上看到命令'cat /proc/ioports '的输出差异。