Skip to main content

CanController Class

Package: GHIElectronics.Endpoint.Core
Namespace: GHIElectronics.Endpoint.Core

Chip-neutral entry point for CAN-bus setup. Call once before using the CAN device package: it muxes the TX/RX pins and brings the canN network interface up at the chosen bitrate.

public static class CanController

Methods​

Initialize(string port, int bitrate)​

public static void Initialize(string port, int bitrate)

Muxes the CAN pins and configures the bitrate.

ParameterTypeDescription
portstringA CAN port name (for example EPN256.Can.Can0).
bitrateintBus bitrate in bits per second (default 500 kbit/s).

UnInitialize(string port)​

public static void UnInitialize(string port)

Takes the interface down and releases its pins.