简体   繁体   中英

redirect UART data to pcie port

I wanted to transmit the data coming to PCIE over to UART.And I have linux os.

Is there anyway that I can redirect the UART data over PCIE slot.

Thanks in advance.

You will need a Linux driver for your PCIe device. If you don't have a Linux driver for it you can access to your PCIe memory space via mmap() in userland like with pci_debug .

Once you have PCIe access you will have to write a Linux application that read/write the serial port tty (/dev/ttyXX) and read/write on your PCIe device.

There is lot's of way to write a Linux application.

[edit]

Here you can see how read write on Linux serial port in C. Reading the C source code of pci_debug available here , you can see how to read/write on PCIe BAR memory with mmap.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM