chan_simpleusb and chan_usbradio have exhibited a timing issue when initializing usb devices on a Dell 5070 computer. This resulted in a HID has died error message. The issue was caused by the routine not updating the lasthidtime often enough. This issue has been addressed and works. This closes #219.
The hidthread routine was carefully documented. Coding standards were applied. I discovered that the CMxxx devices only support 8 GPIO lines. The code was originally setup for 32 gpio lines. A define was added to the program to set the limit to 8 lines. The storage and associated loops were updated with this new define. This saved some cpu time.
The hidthread routine contained special initialization code for the N1KDO usb device. After discussions with Tim, he approved removing that code. This device has not been manufactured in 15 years and the 4 port version was never mass produced. This code contributed to the issue above. I got information directly from N1KDO on the device. An N1KDO device will still be recognized. I believe this code was associated with the 4 port version.
The routine was using ast_select instead of ast_poll. It has been updated to use ast_poll. This moved initialization of the polling variables outside of the loop.
This routine should have been almost identical in both chan_simpleusb and chan_usbradio. Changes were made to bring them both into agreement. Some variables were renamed, some commands were moved slightly. A diff of the two functions now show them to be in better agreement.
The code to check the parallel port for input was being executed regardless of whether we had a parallel port. The code now checks to see if we have a parallel port and skips over that code, saving cpu cycles.
Code to reset the pointers in the internal linked list was wrapped with #if 0 .. #endif. This code did not change anything. The list pointers were always found to be correct. This code can be safely removed after further testing. There have been no problems on two of my systems that run two usb devices.
chan_simpleusb and chan_usbradio have exhibited a timing issue when initializing usb devices on a Dell 5070 computer. This resulted in a HID has died error message. The issue was caused by the routine not updating the lasthidtime often enough. This issue has been addressed and works. This closes #219.
The hidthread routine was carefully documented. Coding standards were applied. I discovered that the CMxxx devices only support 8 GPIO lines. The code was originally setup for 32 gpio lines. A define was added to the program to set the limit to 8 lines. The storage and associated loops were updated with this new define. This saved some cpu time.
The hidthread routine contained special initialization code for the N1KDO usb device. After discussions with Tim, he approved removing that code. This device has not been manufactured in 15 years and the 4 port version was never mass produced. This code contributed to the issue above. I got information directly from N1KDO on the device. An N1KDO device will still be recognized. I believe this code was associated with the 4 port version.
The routine was using ast_select instead of ast_poll. It has been updated to use ast_poll. This moved initialization of the polling variables outside of the loop.
This routine should have been almost identical in both chan_simpleusb and chan_usbradio. Changes were made to bring them both into agreement. Some variables were renamed, some commands were moved slightly. A diff of the two functions now show them to be in better agreement.
The code to check the parallel port for input was being executed regardless of whether we had a parallel port. The code now checks to see if we have a parallel port and skips over that code, saving cpu cycles.
Code to reset the pointers in the internal linked list was wrapped with #if 0 .. #endif. This code did not change anything. The list pointers were always found to be correct. This code can be safely removed after further testing. There have been no problems on two of my systems that run two usb devices.