Fix single-pin half-duplex in SoftwareSerial::send #749
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When SoftwareSerial was adapted from the LPC1768 version, SoftwareSerial::send was altered in a way that prevents single-pin half-duplex communication from working properly.
This change reverts to the behavior seen in other repositories using variations of this code.
This PR fixes/implements the following bugs/features
This issue was discovered while testing a Marlin pull request which is adapting Marlin to work with STM32 5.7. During testing I found that one-pin communication with TMC stepper drivers did not work properly, although it did when using similar SoftwareSerial code from other sources.
The image below shows the same read command being sent to a TMC2208 stepper driver, both before and after the change in this PR. (Doesn't scale well, click to zoom)

Validation
I have validated that I can now communicate properly with TMC stepper drivers using one-wire connections inside Marlin.