From: Igor F. <igo...@gm...> - 2013-09-22 22:01:36
|
On Sun, Sep 22, 2013 at 2:37 AM, Hans de Goede <hde...@re...> wrote: > Not really a trick or a workaround, you just need to make sure > that your application properly closes any devices it has opened > before exiting. Since I am not professional (or even semi professional) programmer, can you, please, point me to the doc | info | code snippet | hint , where I can learn how to close any devices properly. What I did until now, was to take the C++ code example from NANO River Tech web side and compile it on my system (CentOS 6.4). At that time, my CentOS had only the 'old' libusb installed. I am talking here about libusb 0.1 (legacy). Or, to be more specific, NANO River Tech uses http://nanorivertech.com/files/viper/linux/libusb-0.1.12.tar.gz. Their C++ code example works without any issue with the libusb 0.1. No problems with potentially opened devices at exit. There is another I2C interface I want to support with my i2c CLI utility. It is a DIMAX SUB-20 module ( http://www.xdimax.com/sub20/sub20.html ). Their C code example uses libusbx 1.0. So, I decided to install libusbx 1.0.16 + compat layer on the CentOS. This would cover both interface boards. Yes, the both boards work. The NANO board produces warnings about non closed devices at exit. The DIMAX board is OK Igor |