Difference between revisions of "Serial port"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
Line 1: Line 1:
 
[[Serial port/zh|查看中文]]
 
[[Serial port/zh|查看中文]]
  
====Serial Device Names under Multiple Platforms====
+
===Serial port communication in C===
* Allwinner H3/H5 Based Boards (NanoPi M1/NanoPi M1 Plus etc)
+
Please refre:[https://github.com/friendlyarm/comtest]
 +
 
 +
===Serial Device Names under Multiple Platforms===
 +
====Allwinner H3/H5 Based Boards (NanoPi M1/NanoPi M1 Plus etc)====
 
UART1-> /dev/ttyS1<br />
 
UART1-> /dev/ttyS1<br />
 
UART2 -> /dev/ttyS2<br />
 
UART2 -> /dev/ttyS2<br />
 
UART3 -> /dev/ttyS3 (Only applies to NanoPi M1, NanoPi K1 and NanoPi K1 Plus)<br />
 
UART3 -> /dev/ttyS3 (Only applies to NanoPi M1, NanoPi K1 and NanoPi K1 Plus)<br />
  
* S5P4418 Based Boards (NanoPi Fire2A/NanoPi M2A/NanoPi S2/NanoPC-T2 etc)
+
====S5P4418 Based Boards (NanoPi Fire2A/NanoPi M2A/NanoPi S2/NanoPC-T2 etc)====
 
UART1 -> /dev/ttyAMA1  [Note 1]<br />
 
UART1 -> /dev/ttyAMA1  [Note 1]<br />
 
UART2 -> /dev/ttyAMA2  [Note 1]<br />
 
UART2 -> /dev/ttyAMA2  [Note 1]<br />
Line 13: Line 16:
 
UART4 -> /dev/ttyAMA4<br />
 
UART4 -> /dev/ttyAMA4<br />
  
* S5P6818 Based Boards (NanoPi M3/NanoPC-T3 etc)
+
====S5P6818 Based Boards (NanoPi M3/NanoPC-T3 etc)====
 
UART1 -> /dev/ttySAC1 [Note 1]<br />
 
UART1 -> /dev/ttySAC1 [Note 1]<br />
 
UART2 -> /dev/ttySAC2  [Note 1]<br />
 
UART2 -> /dev/ttySAC2  [Note 1]<br />
Line 20: Line 23:
 
<br />
 
<br />
 
Note 1: only applies to specific boards, you need to check if a board has that serial device populated.
 
Note 1: only applies to specific boards, you need to check if a board has that serial device populated.
* NanoPC T4
+
====NanoPC T4====
 
UART4 Only
 
UART4 Only
 
::{| class="wikitable"
 
::{| class="wikitable"

Revision as of 03:34, 22 January 2019

查看中文

1 Serial port communication in C

Please refre:[1]

2 Serial Device Names under Multiple Platforms

2.1 Allwinner H3/H5 Based Boards (NanoPi M1/NanoPi M1 Plus etc)

UART1-> /dev/ttyS1
UART2 -> /dev/ttyS2
UART3 -> /dev/ttyS3 (Only applies to NanoPi M1, NanoPi K1 and NanoPi K1 Plus)

2.2 S5P4418 Based Boards (NanoPi Fire2A/NanoPi M2A/NanoPi S2/NanoPC-T2 etc)

UART1 -> /dev/ttyAMA1 [Note 1]
UART2 -> /dev/ttyAMA2 [Note 1]
UART3 -> /dev/ttyAMA3
UART4 -> /dev/ttyAMA4

2.3 S5P6818 Based Boards (NanoPi M3/NanoPC-T3 etc)

UART1 -> /dev/ttySAC1 [Note 1]
UART2 -> /dev/ttySAC2 [Note 1]
UART3 -> /dev/ttySAC3
UART4 -> /dev/ttySAC4

Note 1: only applies to specific boards, you need to check if a board has that serial device populated.

2.4 NanoPC T4

UART4 Only

Serial Port Funcation
UART0 Bluetooth
UART1 Ehternet
UART2 Debug UART
UART3 Ehternet
UART4 Available, /dev/ttyS4