Skip to content

Commit

Permalink
update & clean deps, disable can examples
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Dec 29, 2021
1 parent 1f799bd commit 3805eb5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md merge=union
29 changes: 11 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cortex-m-rt = "0.7"
nb = "1"
stm32f1 = "0.14.0"
embedded-dma = "0.1.2"
bxcan = ">=0.4, <0.6"
bxcan = "0.6"
cast = { default-features = false, version = "0.3.0" }
void = { default-features = false, version = "1.0.2" }
embedded-hal = { features = ["unproven"], version = "0.2.6" }
Expand All @@ -32,21 +32,14 @@ optional = true

[dev-dependencies]
panic-halt = "0.2.0"
panic-semihosting = "0.5.2"
panic-semihosting = "0.5.6"
panic-itm = "0.4.1"
cortex-m-rtic = "0.6.0-rc.2"
cortex-m-semihosting = "0.3.3"
heapless = "0.7.7"
m = "0.1.1"
cortex-m-rtic = "1.0.0"
cortex-m-semihosting = "0.3.7"
heapless = "0.7.9"
mfrc522 = "0.2.0"
usb-device = "0.2.8"
usbd-serial = "0.1.1"
byteorder = { default-features = false, version = "1.4.3" }
cobs = { default-features = false, version = "0.1.4" }
crc16 = { default-features = false, version = "0.4.0" }
either = { default-features = false, version = "1.6.1" }
serde = { default-features = false, version = "1.0.130"}
serde_derive = "1.0.130"

[features]
device-selected = []
Expand Down Expand Up @@ -110,17 +103,17 @@ required-features = ["rt", "medium"]
name = "exti"
required-features = ["rt"]

[[example]]
name = "can-echo"
required-features = ["has-can"]
#[[example]]
#name = "can-echo"
#required-features = ["has-can"]

[[example]]
name = "can-loopback"
required-features = ["has-can"]

[[example]]
name = "can-rtic"
required-features = ["has-can", "rt"]
#[[example]]
#name = "can-rtic"
#required-features = ["has-can", "rt"]

[[example]]
name = "gpio_input"
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions examples/can-loopback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ fn main() -> ! {
#[cfg(feature = "connectivity")]
let can = Can::new(dp.CAN1);

let mut can = bxcan::Can::new(can);

// Use loopback mode: No pins need to be assigned to peripheral.
// APB1 (PCLK1): 8MHz, Bit rate: 500Bit/s, Sample Point 87.5%
// Value was calculated with http://www.bittiming.can-wiki.info/
can.modify_config()
let mut can = bxcan::Can::builder(can)
.set_bit_timing(0x001c_0000)
.set_loopback(true)
.set_silent(true);
.set_silent(true)
.leave_disabled();

let mut filters = can.modify_filters();
assert!(filters.num_banks() > 3);
Expand Down Expand Up @@ -83,7 +82,7 @@ fn main() -> ! {
drop(filters);

// Sync to the bus and start normal operation.
block!(can.enable()).ok();
block!(can.enable_non_blocking()).ok();

// Some messages shall pass the filters.
for &id in &[0, 1, 2, 8, 9, 10, 11] {
Expand Down
File renamed without changes.

0 comments on commit 3805eb5

Please sign in to comment.