Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit 4975679

Browse files
committed
otg uart
1 parent d9636ce commit 4975679

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
NO.|文件名称|摘要
1414
:--:|:--|:--
15+
0019| [USB_OTG虚拟串口](docs/0019_USB_OTG虚拟串口.md) | USB OTG虚拟串口,可用于学习串口通信
1516
0018| [利用AT24C02_EEPROM理解I2C通信](docs/0018_利用AT24C02_EEPROM理解I2C通信.md) | 利用Overlay加载AT24C02 I2C驱动,通过i2c-tools获取数据
1617
0017| [GPIO中断模式控制网页](docs/0017_GPIO中断模式控制网页.md) | 通过Python3 Flask/websocket作为服务端,使用GPIO控制网页背景
1718
0016| [IoT网页GPIO控制LED](docs/0016_IoT网页GPIO控制LED.md) | 通过Python3 Flask作为HTTP服务端,控制GPIO

docs/0019_USB_OTG虚拟串口.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# USB OTG虚拟串口
2+
3+
USB OTG虚拟串口,可用于学习串口通信
4+
5+
## 树莓派启动配置
6+
7+
* /boot/cmdline.txt
8+
* 第一行末尾添加:`modules-load=dwc2,g_serial dwc_otg.lpm_enable=1`
9+
* /boot/config.txt
10+
* 文件最后添加行:`dtoverlay=dwc2`
11+
* reboot
12+
13+
## 节点
14+
15+
* 树莓派:
16+
* /dev/ttyGS0
17+
* PC
18+
* COM3
19+
20+
## 安装调试工具
21+
22+
* sudo apt-get install minicom
23+
* minicom -s
24+
* 退出:ctrl + a, q, enter
25+
26+
27+
## 参考C代码
28+
29+
https://github.com/ZengjfOS/UartRS

0 commit comments

Comments
 (0)