stm32-rs / bxcan

bxCAN peripheral driver for STM32 chips
Apache License 2.0
31 stars 22 forks source link

Issue with creating new instance of can for STM32F429 Discovery board using bxcan #55

Closed ApoorvSingh0009 closed 1 year ago

ApoorvSingh0009 commented 1 year ago

Problem while executing the example file can-send.rs from the stm32f4xx_hal crate [https://github.com/stm32-rs/stm32f4xx-hal/blob/master/examples/can-send.rs] for stm32f429 Discovery board, cannot find any way to instantiate can using new(), the compiler shows error saying there is no such function like new(). I have been facing this issue since a while. It would be great if you could help.

image

ApoorvSingh0009 commented 1 year ago

This change in cargo.toml solves the issue.

[dependencies.stm32f4xx-hal]
git = "https://github.com/stm32-rs/stm32f4xx-hal"
features = ["stm32f429", "rt", "can"]