Skip to content

Commit a5ca0e4

Browse files
Slight doc touchup
1 parent d2dee21 commit a5ca0e4

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/filter.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ impl Mask16 {
7979
/// Creates a 16-bit identifier mask that accepts all frames with the given standard
8080
/// ID and mask combination.
8181
///
82-
/// Filter logic: frame_accepted = (incoming_id & mask) == (id & mask)
83-
/// A mask of all all ones (0x7FF) matches the exact ID, a mask of 0 matches all IDs.
82+
/// Filter logic: `frame_accepted = (incoming_id & mask) == (id & mask)`
83+
///
84+
/// A mask of all all ones (`0x7FF`) matches an exact ID, a mask of 0 matches all IDs.
8485
///
8586
/// Both data and remote frames with `id` will be accepted. Any extended frames will be
8687
/// rejected.
@@ -117,8 +118,9 @@ impl Mask32 {
117118
/// Creates a 32-bit identifier mask that accepts all frames with the given extended
118119
/// ID and mask combination.
119120
///
120-
/// Filter logic: frame_accepted = (incoming_id & mask) == (id & mask)
121-
/// A mask of all all ones (0x1FFF_FFFF) matches the exact ID, a mask of 0 matches all IDs.
121+
/// Filter logic: `frame_accepted = (incoming_id & mask) == (id & mask)`
122+
///
123+
/// A mask of all all ones (`0x1FFF_FFFF`) matches an exact ID, a mask of 0 matches all IDs.
122124
///
123125
/// Both data and remote frames with `id` will be accepted. Standard frames will be rejected.
124126
pub fn frames_with_ext_id(id: ExtendedId, mask: ExtendedId) -> Self {
@@ -131,8 +133,9 @@ impl Mask32 {
131133
/// Creates a 32-bit identifier mask that accepts all frames with the given standard
132134
/// ID and mask combination.
133135
///
134-
/// Filter logic: frame_accepted = (incoming_id & mask) == (id & mask)
135-
/// A mask of all all ones (0x7FF) matches the exact ID, a mask of 0 matches all IDs.
136+
/// Filter logic: `frame_accepted = (incoming_id & mask) == (id & mask)`
137+
///
138+
/// A mask of all all ones (`0x7FF`) matches the exact ID, a mask of 0 matches all IDs.
136139
///
137140
/// Both data and remote frames with `id` will be accepted. Extended frames will be rejected.
138141
pub fn frames_with_std_id(id: StandardId, mask: StandardId) -> Self {

src/lib.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ pub unsafe trait Instance {
6969
///
7070
/// In master-slave-instance setups, only the master instance owns the filter banks, and needs to
7171
/// split some of them off for use by the slave instance. In that case, the master instance should
72-
/// implement `FilterOwner` and `MasterInstance`, while the slave instance should only implement
73-
/// `Instance`.
72+
/// implement [`FilterOwner`] and [`MasterInstance`], while the slave instance should only implement
73+
/// [`Instance`].
7474
///
7575
/// In single-instance configurations, the instance owns all filter banks and they can not be split
76-
/// off. In that case, the instance should implement `Instance` and `FilterOwner`.
76+
/// off. In that case, the instance should implement [`Instance`] and [`FilterOwner`].
7777
///
7878
/// # Safety
7979
///
@@ -296,7 +296,7 @@ impl<I> Can<I>
296296
where
297297
I: Instance,
298298
{
299-
/// Creates a CAN interface, taking ownership of the raw peripheral.
299+
/// Creates a CAN interface, taking ownership of the raw peripheral instance.
300300
pub fn new(instance: I) -> Self {
301301
Can { instance }
302302
}
@@ -630,10 +630,9 @@ where
630630

631631
/// Puts a CAN frame in a free transmit mailbox for transmission on the bus.
632632
///
633-
/// This function is equivalent to [`transmit`](#method.transmit) except that it returns the
634-
/// mailbox that was accessed. This can be used to keep track of additional information
635-
/// about each frame, even when frames are placed into transmit mailboxes and later
636-
/// removed before being transmitted.
633+
/// This function is equivalent to [`Tx::transmit`] except that it returns the mailbox that was
634+
/// accessed. This can be used to keep track of additional information about each frame, even
635+
/// when frames are placed into transmit mailboxes and later removed before being transmitted.
637636
pub fn transmit_and_get_mailbox(
638637
&mut self,
639638
frame: &Frame,

0 commit comments

Comments
 (0)