Backport few core fixes from Arduino fork#167
Open
DhruvaG2000 wants to merge 3 commits intozephyrproject-rtos:nextfrom
Open
Backport few core fixes from Arduino fork#167DhruvaG2000 wants to merge 3 commits intozephyrproject-rtos:nextfrom
DhruvaG2000 wants to merge 3 commits intozephyrproject-rtos:nextfrom
Conversation
soburi
reviewed
Feb 28, 2026
Comment on lines
+122
to
+124
| k_sem_take(&tx.sem, K_FOREVER); | ||
| ret = ring_buf_space_get(&tx.ringbuf); | ||
| k_sem_give(&tx.sem); |
Member
There was a problem hiding this comment.
This part is from
arduino@66f8f71d3.
Shouldn't the contribution of the author of this commit also be listed?
Member
Author
Member
There was a problem hiding this comment.
https://github.com/arduino/ArduinoCore-zephyr/blame/main/cores/arduino/zephyrSerial.cpp#L126-L134
As you can clearly understand from blame list, this function
has three authorships.
This also only has matched three lines.
Member
Author
There was a problem hiding this comment.
Ah okay, so I will try to pick all 3 then
Member
Author
There was a problem hiding this comment.
One of them was just a formatting fix, which I'm leaving out for now
It was getting the 32 bit value dividing by system clock speed and returning it, so it never fully went through the 32 bit value to properly rollover changed to retrieve the 64 bit value instead, which appears to work Output from example sketch from before, shows rollover now: ``` US: 4288826633 4289826702 1000069 MS: 4288826 4289826 1000 US: 4289826733 4290826802 1000069 MS: 4289826 4290826 1000 US: 4290826833 4291826902 1000069 MS: 4290826 4291826 1000 US: 4291826933 4292827002 1000069 MS: 4291826 4292827 1001 US: 4292827057 4293827102 1000045 MS: 4292827 4293827 1000 US: 4293827133 4294827202 1000069 MS: 4293827 4294827 1000 US: 4294827233 860006 1000069 MS: 4294827 4295827 1000 US: 860058 1860107 1000049 MS: 4295827 4296827 1000 US: 1860137 2860206 1000069 MS: 4296827 4297827 1000 US: 2860237 3860306 1000069 MS: 4297827 4298827 1000 US: 3860358 4860406 1000048 MS: 4298827 4299827 1000 ``` pick: arduino@14f3f0f Signed-off-by: Dhruva Gole <d-gole@ti.com>
added availableForWrite - overwrite Print virtual - get it from ring buffer Fix peek and Read, that if 0 bytes read from ring buffer return -1 begin method appeared to have initial garbage in it. so have it call ring_buf_reset on the rx ring buffer Signed-off-by: Dhruva Gole <d-gole@ti.com>
availableForWrite() was taking the free space of the Rx buffer instead of the Tx buffer. Pick: arduino@66f8f71 Signed-off-by: Dhruva Gole <d-gole@ti.com>
d65005b to
a76b22d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Added DNM while we first get clarity on what we should be doing about the missing SoB's .