can4osx

Userspace USB driver for CAN to USB adaptors - based on the Kvaser canlib API

This project is maintained by aph-le

can4osx

Version 0.0.1

Overview

User-space driver for OSX using IOKitLib and IOUSBLib CAN to USB Adapters using the Kvaser canlib API. Based on Kvaser canlib linux driver.

Supported Devices

Supported Functions

Usage

Please refer to the Kvaser canlib documentation.

Example

    
void simpleSend(void)
{
CanHandle hdl;
int channel = 0;
int bitrate = canBITRATE_125K;
	
	canInitializeLibrary();
	
	hdl = canOpenChannel(channel, canOPEN_EXCLUSIVE | canOPEN_REQUIRE_EXTENDED);
	
	canBusOff(hdl);
		
	canSetBusParams(hdl, bitrate, 10, 5, 1, 1, 0);
	
	canBusOn(hdl);
	
	canWrite(hdl, 0x123, "can4osx", 8, 0);
	
	canBusOff(hdl);
}
    

Todo