#frame #protocols #parser #generate

smcan

A no_std rust crate to generate and parse CAN Frames for the SM-CAN protocol

3 releases

0.1.2 Aug 29, 2023
0.1.1 Aug 4, 2023
0.1.0 Aug 2, 2023

#104 in #frame

Download history 13/week @ 2024-02-05 25/week @ 2024-02-19 36/week @ 2024-02-26 7/week @ 2024-03-04 45/week @ 2024-03-11 24/week @ 2024-03-18 185/week @ 2024-03-25 126/week @ 2024-04-01

381 downloads per month

MPL-2.0 license

12KB
99 lines

smcan-rs

A no_std rust crate to generate and parse CAN Frames for the Salient Motion SM-CAN Protocol.

Install the crate

cargo add smcan

Examples

socketcan_recrev_cmd.rs will send and receive CAN-FD Frames via the linux socketcan interface using socketcan-rs

To run the example first bring up a vcan0 interface:

sudo modprobe vcan
sudo ip link add vcan0 type vcan
sudo ip link set vcan0 up

Then run socketcan_recrev_cmd.rs:

cargo run --example socketcan_recrev_cmd

Dependencies

~2MB
~40K SLoC