8 releases

0.1.0-beta0 Nov 15, 2024
0.1.0-alpha8 Nov 11, 2024
0.1.0-alpha5 Oct 25, 2024
0.1.0-alpha2 Sep 10, 2024

#294 in Hardware support

Download history 241/week @ 2024-09-02 145/week @ 2024-09-09 57/week @ 2024-09-16 8/week @ 2024-09-23 48/week @ 2024-09-30 342/week @ 2024-10-07 14/week @ 2024-10-14 119/week @ 2024-10-21 16/week @ 2024-10-28 360/week @ 2024-11-11 26/week @ 2024-11-18 16/week @ 2024-12-02

402 downloads per month

MIT OR GPL-3.0

715KB
15K SLoC

A Cross-platform ZLG(周立功) CAN driver.

Latest version Documentation LGPL MIT

Overview

zlgcan is a cross-platform driver for ZLG(周立功) device. Including windows and linux.

It is a part of rust-can driver.

It also can use UDS-protocol directly.

Please refer to examples for usage examples

Device list

  • USBCAN-I/II
  • USBCANFD-200U
  • USNCANFD-400U(only channel 1 and channel 2 can be used)
  • USBCANFD-800U

Prerequisites

  • Rust 1.70 or higher
  • Cargo (included with Rust)

Adding to Your Project

To use zlgcan in your Rust project, add it as a dependency in your Cargo.toml:

[dependencies]
zlgcan = { version="lastest-version" }

Create library and configuration

  • Create folder and ensure the file of folder like:

    ├── bitrate.cfg.yaml
    ├── linux
       └── x86_64
    └── windows
        ├── x86
        └── x86_64
    

    and copy all files into correct directory.

    The basic library. The bitrate.cfg.yaml

  • Create zcan.env at your project path for special ZCAN_LIBRARY path, For example:

    ZCAN_LIBRARY=/path/to/your/created
    

Known defects

  • The timestamp of frame is incorrect.

Contributing

We're always looking for users who have thoughts on how to make zlgcan better, or users with interesting use cases.

Of course, we're also happy to accept code contributions for outstanding feature requests!

Dependencies

~2.2–3.5MB
~66K SLoC