Kvaser Linux CANLIB
|
Strictly speaking it is not necessary to clean up anything before terminating the application. If the application quits unexpectedly, the device driver will ensure the CAN controller is deactivated and the driver will also ensure the firmware (if any) is left in a consistent state.
To deinitialize the library in an orderly fashion you may want to call canWriteSync() with a short timeout for each open handle before closing them with canClose(), to ensure the transmit queues are empty.
If you want to reinitialize the library from scratch in an application that already has initialized the library, call canUnloadLibrary(). You can then start afresh by calling canInitializeLibrary() again.