diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..a19ade07 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +CHANGELOG.md merge=union diff --git a/Cargo.toml b/Cargo.toml index f31f470c..221a8a9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } @@ -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 = [] @@ -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" diff --git a/examples/can-echo.rs b/examples/can-echo.rs.disabled similarity index 100% rename from examples/can-echo.rs rename to examples/can-echo.rs.disabled diff --git a/examples/can-loopback.rs b/examples/can-loopback.rs index 010a47dd..a0c8b9c7 100644 --- a/examples/can-loopback.rs +++ b/examples/can-loopback.rs @@ -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); @@ -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] { diff --git a/examples/can-rtic.rs b/examples/can-rtic.rs.disabled similarity index 100% rename from examples/can-rtic.rs rename to examples/can-rtic.rs.disabled