Skip to content

Commit 7d9e83a

Browse files
committed
Add todos
1 parent 02b7f02 commit 7d9e83a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/can.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
1414
pub use embedded_hal_can::{self, Filter, Frame, Id, Receiver, Transmitter};
1515

16+
// TODO Switch to embedded-can
17+
// https://github.com/timokroeger/embedded-can/blob/master/src/lib.rs
18+
// https://github.com/rust-embedded/embedded-hal/pull/212
19+
// TODO Use bxcan
20+
// https://github.com/stm32-rs/bxcan
21+
1622
use crate::gpio::gpioa;
1723
use crate::gpio::AF9;
1824
use crate::rcc::APB1;
@@ -33,13 +39,14 @@ pub enum CanId {
3339
/// Extended 29bit Identifier (0..=0x1FFF_FFFF)
3440
ExtendedId(u32),
3541
}
36-
3742
/// A CAN frame consisting of a destination ID and up to 8 bytes of data.
3843
///
3944
/// Currently, we always allocate a fixed size array for each frame regardless
4045
/// of actual size, but this could be improved in the future using const-generics.
4146
#[derive(Debug, Clone, Eq, PartialEq)]
4247
pub struct CanFrame {
48+
// TODO must they be pub?
49+
// How are they set and get interally?
4350
/// CAN Frame ID
4451
id: CanId,
4552
/// Data Length Code (range 0..8)
@@ -187,6 +194,7 @@ impl embedded_hal_can::Filter for CanFilter {
187194

188195
/// Constuct a mask filter. This method accepts two parameters, the mask which designates which
189196
/// bits are actually matched againts and the filter, with the actual bits to match.
197+
// TODO Result?
190198
fn from_mask(mask: u32, filter: u32) -> Self {
191199
assert!(
192200
mask < MAX_EXTENDED_ID,

0 commit comments

Comments
 (0)