Commit a8c74c4
feat(uart): Add function to invert hardware UART Tx line (#11428)
* feat(uart): Add function to invert hardware UART Tx line
Simply clone existing Rx functionality for Tx.
Allow granular control over both lines.
Avoid overloading HardwareSerial::begin() to change the bool invert parameter to a bitmask type.
Add an untested implementation for ESP32C6, ESP32H2, ESP32P4 that references the different register
naming on those chips.
* feat(uart): Refactor UART signal inversion handling
Refactor UART inversion functions to use a helper for signal inversion. Update UART bus array structure to include inversion mask.
* feat(uart): Add UART signal inversion functions
Added functions for UART signal inversion and updated existing function signatures.
* feat(uart): Refactor UART signal inversion handling
* feat(uart): Change setRxInvert and setTxInvert to return bool
* feat(uart) : Refactor serial inversion methods to return bool
Changed setRxInvert, setTxInvert to return bool. Added setCtsInvert and setRtsInvert methods.
* feat(uart): adds commentatries
Added functions for UART pins signal inversion.
* feat(uart): add commentaties
* feat(uart): Refactor uartPinSignalInversion for mutex locking
* Refactor UART inversion functions to use new method
* fix(uart): missing uart struct usage
* fix(uart): missing function return value
* feat(uart): add commentaties
* fix(uart): inverting rx instead of tx
* feat(uart): logging for UART signal inversion
Added logging for signal inversion in UART functions.
* feat(uart): standard verbose log message
* feat(uart): add not inverted verbose log message
* fix(uart): misspeling comment
Co-authored-by: Copilot <[email protected]>
* fix(uart): fixes bad code formating
Co-authored-by: Copilot <[email protected]>
* fix(uart): fixes misspeling
Co-authored-by: Copilot <[email protected]>
* fix(uart): fixes bad code formating
Co-authored-by: Copilot <[email protected]>
* fix(uart): fixes bad code formating
Co-authored-by: Copilot <[email protected]>
* fix(uart): fixes bad code formating
Co-authored-by: Copilot <[email protected]>
* fix(uart): fixes extra spaces
Co-authored-by: Copilot <[email protected]>
* fix(uart): extra spacing
Co-authored-by: Copilot <[email protected]>
* feat(uart): Improve logging for UART signal inversion
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Sugar Glider <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>1 parent e3ce2ec commit a8c74c4
File tree
5 files changed
+109
-35
lines changed- cores/esp32
- tests/validation/uart
5 files changed
+109
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
576 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
577 | 589 | | |
578 | 590 | | |
579 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
873 | 874 | | |
874 | 875 | | |
875 | 876 | | |
876 | | - | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
877 | 884 | | |
878 | 885 | | |
879 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
880 | 891 | | |
881 | 892 | | |
882 | 893 | | |
| |||
978 | 989 | | |
979 | 990 | | |
980 | 991 | | |
981 | | - | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
982 | 996 | | |
983 | | - | |
| 997 | + | |
984 | 998 | | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
999 | 1003 | | |
1000 | | - | |
| 1004 | + | |
1001 | 1005 | | |
1002 | | - | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1003 | 1044 | | |
1004 | 1045 | | |
1005 | 1046 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
| |||
351 | 355 | | |
352 | 356 | | |
353 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
354 | 362 | | |
355 | 363 | | |
356 | 364 | | |
| |||
0 commit comments