Skip to content

Commit aaa29c0

Browse files
adri326Dirbaio
authored andcommitted
Fix small mistake in the documentation of RcDevice::new
1 parent be43383 commit aaa29c0

File tree

1 file changed

+3
-3
lines changed
  • embedded-hal-bus/src/spi

1 file changed

+3
-3
lines changed

embedded-hal-bus/src/spi/rc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use crate::spi::shared::transaction;
1616
/// Both of these mechanisms only allow sharing within a single thread (or interrupt priority level).
1717
/// For this reason, this does not implement [`Send`].
1818
///
19-
/// When this structure is dropped, the reference count of the `Bus` will be decremented,
20-
/// and the bus driver will be cleaned up when that count reaches zero.
19+
/// When this structure is dropped, the reference count of the `Bus` instance will be decremented,
20+
/// and it will be cleaned up once the reference count reaches zero.
2121
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
2222
pub struct RcDevice<Bus, Cs, Delay> {
2323
bus: Rc<RefCell<Bus>>,
@@ -32,7 +32,7 @@ impl<Bus, Cs, Delay> RcDevice<Bus, Cs, Delay> {
3232
/// It is recommended to have already set that pin high the moment it has been configured as an output, to avoid glitches.
3333
///
3434
/// This function does not increment the reference count:
35-
/// you will need to call `Rc::clone(&bus)` if you only have a `&RefCell<Bus>`.
35+
/// you will need to call `Rc::clone(&bus)` if you only have a `&Rc<RefCell<Bus>>`.
3636
#[inline]
3737
pub fn new(bus: Rc<RefCell<Bus>>, mut cs: Cs, delay: Delay) -> Result<Self, Cs::Error>
3838
where

0 commit comments

Comments
 (0)