fix(embassy-rp): fix drop implementation of BufferedUartRx and BufferedUartTx
This commit is contained in:
@@ -123,6 +123,11 @@ impl RingBuffer {
|
||||
Some(Writer(self))
|
||||
}
|
||||
|
||||
/// Return if buffer is available.
|
||||
pub fn is_available(&self) -> bool {
|
||||
!self.buf.load(Ordering::Relaxed).is_null() && self.len.load(Ordering::Relaxed) != 0
|
||||
}
|
||||
|
||||
/// Return length of buffer.
|
||||
pub fn len(&self) -> usize {
|
||||
self.len.load(Ordering::Relaxed)
|
||||
|
||||
Reference in New Issue
Block a user