mciantyre / teensy4-rs

Rust support for the Teensy 4
Apache License 2.0
271 stars 31 forks source link

FlexCAN peripheral addition #124

Closed dstric-aqueduct closed 3 weeks ago

dstric-aqueduct commented 1 year ago

This pull request adds functionality for the imxrt's FlexCAN1 and FlexCAN2 peripherals.

The update adds two examples of peripheral:

See corresponding PR for imxrt-hal crate: https://github.com/imxrt-rs/imxrt-hal/pull/122

mciantyre commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build failed:

collin80 commented 1 year ago

Cool! But, the Teensy 4 CPU technically has three CAN buses in hardware, not two. The third is CAN-FD capable. Are there any plans to support this?

mciantyre commented 1 year ago

FlexCAN3 is not available through the HAL, not even for CAN 2.0B functions. There's also no CANFD support in the proposed driver.

If you have a need for that third CAN network or CANFD, could you leave a note on the upstream PR? It'll reach a wider audience.

mciantyre commented 3 weeks ago

See #162 for a rebase of these commits.