Skip to content

Commit 8bc6033

Browse files
committed
feat(rmt_uart): update, need squash
1 parent c7ba0df commit 8bc6033

19 files changed

+123
-167
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ body:
5252
- quirc
5353
- sh2lib
5454
- spi_nand_flash
55+
- soft_uart
5556
- supertinycron
5657
- thorvg
5758
- zlib

.github/workflows/upload_component.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
quirc;
6464
sh2lib;
6565
spi_nand_flash;
66+
soft_uart;
6667
supertinycron;
6768
thorvg;
6869
zlib;

.idf_build_apps.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ manifest_file = [
2020
"pid_ctrl/.build-test-rules.yml",
2121
"qrcode/.build-test-rules.yml",
2222
"quirc/.build-test-rules.yml",
23+
"soft_uart/.build-test-rules.yml",
2324
"zlib/.build-test-rules.yml",
2425
".build-test-rules.yml",
2526
]

rmt_soft_uart/README.md

Lines changed: 0 additions & 82 deletions
This file was deleted.

soft_uart/.build-test-rules.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
soft_uart/example:
2+
disable:
3+
- if: CONFIG_SOC_RMT_SUPPORTED != 1
4+
reason: Relevant only for RMT enabled targets

soft_uart/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0
2+
3+
- Initial driver version
File renamed without changes.

soft_uart/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Software UART
2+
3+
[![Component Registry](https://components.espressif.com/components/espressif/rmt_soft_uart/badge.svg)](https://components.espressif.com/components/espressif/rmt_soft_uart)
4+
5+
This directory contains an implementation for software UART. Currently only RMT is supported as the software UART backend.
6+
7+
To learn more about how to use this component, please check API Documentation from header file [rmt_uart.h](./include/rmt_uart.h).

rmt_soft_uart/example/CMakeLists.txt renamed to soft_uart/example/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ cmake_minimum_required(VERSION 3.16)
33
set(COMPONENTS main)
44

55
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6-
project(rmt_soft_uart)
6+
project(soft_uart)

soft_uart/example/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Software UART Example (RMT backend)
2+
3+
This example demonstrates how to simulate UART using the [soft_uart](https://components.espressif.com/component/espressif/soft_uart) component.
4+
5+
## How to Use Example
6+
7+
### Hardware Required
8+
9+
* A development board with Espressif SoC
10+
* A USB cable for Power supply and programming
11+
* A UART bridge (optional, set the TX and RX pins to be the same as the loopback test if don't have)
12+
13+
### Configure the Example
14+
15+
Before project configuration and build, be sure to set the correct chip target using `idf.py set-target <chip_name>`. Then assign the proper GPIO in the [source file](main/soft_uart_main.c).
16+
17+
### Build and Flash
18+
19+
Run `idf.py -p PORT build flash monitor` to build, flash and monitor the project.
20+
21+
(To exit the serial monitor, type ``Ctrl-]``.)
22+
23+
See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.
24+
25+
## Example Output (loopback test)
26+
27+
```text
28+
I (248) main_task: Started on CPU0
29+
I (248) main_task: Calling app_main()
30+
I (258) rmt-uart: new rmt uart at 0x4087cd38, baud=115200 rmt_resolution=921600
31+
I (268) rmt_uart_example: Read len: 23, data: RMT UART, transmission
32+
I (278) rmt_uart_example: Read len: 23, data: RMT UART, transmission
33+
I (288) rmt_uart_example: Read len: 23, data: RMT UART, transmission
34+
I (298) rmt_uart_example: Read len: 23, data: RMT UART, transmission
35+
I (308) rmt_uart_example: Read len: 23, data: RMT UART, transmission
36+
I (318) rmt_uart_example: Read len: 23, data: RMT UART, transmission
37+
I (328) rmt_uart_example: Read len: 23, data: RMT UART, transmission
38+
I (338) rmt_uart_example: Read len: 23, data: RMT UART, transmission
39+
I (348) rmt_uart_example: Read len: 23, data: RMT UART, transmission
40+
I (358) rmt_uart_example: Read len: 23, data: RMT UART, transmission
41+
I (368) rmt_uart_example: Read len: 23, data: RMT UART, transmission
42+
I (378) rmt_uart_example: Read len: 23, data: RMT UART, transmission
43+
I (388) rmt_uart_example: Read len: 23, data: RMT UART, transmission
44+
I (398) rmt_uart_example: Read len: 23, data: RMT UART, transmission
45+
I (408) rmt_uart_example: Read len: 23, data: RMT UART, transmission
46+
I (418) rmt_uart_example: Read len: 23, data: RMT UART, transmission
47+
I (478) rmt_uart_example: UART transmit 16 times!
48+
I (478) main_task: Returned from app_main()
49+
50+
```

0 commit comments

Comments
 (0)