-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get the last time when the tx write buffer got emptied #17978
Conversation
amilcarlucas
commented
Jul 9, 2021
•
edited
Loading
edited
@@ -144,6 +144,9 @@ class ChibiOS::UARTDriver : public AP_HAL::UARTDriver { | |||
*/ | |||
bool is_dma_enabled() const override { return rx_dma_enabled && tx_dma_enabled; } | |||
|
|||
// get the last time when the tx write buffer got emptied | |||
uint32_t get_last_tx_empty_us() const override { return (tx_dma_enabled && _writebuf.is_empty()) ? _last_write_completed_us : 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this depends on DMA config ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the _last_write_completed_us only gets written to if tx_dma_enabled == true
Heads up @bugobliterator - the "ChibiOS" label was applied to this issue. |
47a6bd4
to
42c1796
Compare
@amilcarlucas do you still need this ? |
It is still needed. |
Ok with me. Does this affect the size? I have a feeling that inline virtuals are not optimal |
42c1796
to
252d6cc
Compare
I rebased it now, will check size once CI is finished |
Size comparison added on the description |
I just realized that FETtec no longer needs this, closing |