#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

#156 in #frame

Download history 1/week @ 2024-07-29 13/week @ 2024-09-23 76/week @ 2024-09-30 21/week @ 2024-10-07

110 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
~42K SLoC