#driver #devices #frame #channel #linux #error #zlgcan

yanked zlgcan_common

A ZLGCAN driver with rust

6 releases

3.0.0-rc1 Aug 13, 2024
3.0.0-rc0 Aug 12, 2024
2.0.0-rc2 Jun 11, 2024
1.0.0-rc4 May 31, 2024
0.2.1 Mar 30, 2024

#93 in #frame

Download history 11/week @ 2024-07-22 317/week @ 2024-08-12 16/week @ 2024-09-16 1/week @ 2024-09-23 45/week @ 2024-09-30

1,661 downloads per month
Used in zlgcan_driver

GPL-3.0 license

100KB
3K SLoC

This project is move to part of ecu-proto-rs

ZLGCAN driver for rust

  • Build release for Linux x86_64

    cargo build --target x86_64-unknown-linux-gnu --release 
    
  • Build release for Windows x86_64 with GNU

    cargo build --target x86_64-pc-windows-gnu --release 
    
  • Build release for Windows x86_64 with MSVC

    cargo build --target x86_64-pc-windows-msvc --release 
    

lib.rs:

The common struct or enum defined by head(.h) file. It's include difference's device driver on windows or linux. The goal of this lib is to create structures that are compatible with different devices.

For this reason, we divided the structure into four modules: can module defined "CAN channel", "CAN frame" and "CAN constant" that include constants and enums. And for define a common frame, we define the file frame.rs and utils.rs for avoiding file to long. cloudmodule defined the struct for cloud device. device module defined the struct for device. lin module defined the LIN struct. The error.rs defined the only error struct. The util.rs defined utility functions.

Dependencies

~4–10MB
~114K SLoC