Skip to content

Commit

Permalink
Document project feature matrix in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Notgnoshi committed Nov 7, 2023
1 parent c2200b1 commit 753c5aa
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,42 @@ Tests for this library are run with Cargo
```sh
cargo test
```

## Features

This crate provides multiple optional features that allow the user to pick and choose what they want
to compile.

| Feature name | Description | Enabled by default |
|--------------|----------------------------------------------------------------|--------------------|
| `peak` | Enables the `ag_iso_stack::driver::PeakDriver` | No |
| `socketcan` | Enables the `ag_iso_stack::driver::SocketcanDriver` | No |
| `tracing` | Enables developer diagnostic logging using the `tracing` crate | No |

Pass these features to Cargo when building like: `cargo build --features socketcan,tracing`.

### PCAN-Basic
Note that the `peak` CAN driver requires kernel support (should be enabled by default) _and_ the
`pcanbasic` library, for which there does not seem to be support for in the Ubuntu or Fedora package
repositories.

For Linux, you'll have to build and install from source after downloading the library here:
<https://www.peak-system.com/fileadmin/media/linux/index.htm#Section_Driver-Proproetary>

```sh
## Fedora:
# sudo dnf install kernel-devel popt-devel
sudo apt install linux-headers-generic libpopt-dev
tar -xzvf peak-linux-driver-8.16.0.tar.gz
cd peak-linux-driver-8.16.0/
make clean
make all
sudo make install
## Fedora:
# make KERNEL_LOCATION=/usr/src/kernels/6.5.9-200.fc38.x86_64/ clean
# EXTRA_CFLAGS=-Wno-error=incompatible-pointer-types make KERNEL_LOCATION=/usr/src/kernels/6.5.9-200.fc38.x86_64/ NET=NETDEV_SUPPORT all
# sudo make KERNEL_LOCATION=/usr/src/kernels/6.5.9-200.fc38.x86_64/ install
```

For Windows, it appears you can install the driver and PCAN-Basic library from
<https://www.peak-system.com/Drivers.523.0.html?&L=1>.

0 comments on commit 753c5aa

Please sign in to comment.