5 releases

2.0.0-rc2 Jun 11, 2024
2.0.0-rc1 Jun 8, 2024
1.0.0-rc4 May 31, 2024
0.3.4 May 5, 2024
0.2.1 Mar 30, 2024

#578 in Hardware support

Download history 277/week @ 2024-03-24 368/week @ 2024-03-31 21/week @ 2024-04-07 1/week @ 2024-04-14 348/week @ 2024-04-21 245/week @ 2024-04-28 294/week @ 2024-05-05 105/week @ 2024-05-12 17/week @ 2024-05-19 440/week @ 2024-05-26 245/week @ 2024-06-02 240/week @ 2024-06-09 12/week @ 2024-06-16

525 downloads per month
Used in zlgcan_driver

Custom license

99KB
2.5K SLoC

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

~2–2.8MB
~60K SLoC