host-can 0.1.3

Host library for CAN adapters
Documentation
# host-can ![License: MIT OR Apache-2.0]https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue [![host-can on crates.io]https://img.shields.io/crates/v/host-can]https://crates.io/crates/host-can [![host-can on docs.rs]https://docs.rs/host-can/badge.svg]https://docs.rs/host-can [![Source Code Repository]https://img.shields.io/badge/Code-On%20GitLab-blue?logo=GitLab]https://gitlab.com/mfairman/host-can ![Rust Version: 1.85.0]https://img.shields.io/badge/rustc-1.85.0-orange.svg

A library for talking to CAN adapters on different platforms
(MacOS via PCANBasic and Linux via socketcan currently).

**NOTE: this is an early development version and APIs are
not yet stabilized.**

## Platforms and Adapters

* **MacOS**
  * Install PCUSB library from [https://www.mac-can.com][__link0]
  * PCAN-USB is the only adapter supported currently
* **Linux**
  * Uses SocketCAN interface, all adapters with kernel drivers supported
* **Windows (PRELIMINARY)**
* Install PCAN-Basic library from [https://www.peak-system.com][__link1]
* Note that using `Adapter::recv()` with a timeout will consume excess CPU cycles

## Usage

Add `host-can` to your project, specifying the `pcan` (MacOS) or `socketcan`
(Linux) feature:

```shell
cargo add host-can --features=<pcan | socketcan>
```

See the `tests/` directory for example code.

## TODO

* Async APIs
* CanFD support
* Timestamp support
* Adapter-specific APIs for device control/queries
* Handle adapter disconnect/reconnect
* Optimize windows adapter read timeout logic
* More tests / docs / examples


 [__link0]: https://www.mac-can.com
 [__link1]: https://www.peak-system.com/fileadmin/media/files/PCAN-Basic.zip