  dcihid-0.5.1
  
. dcihid-0.5.1 is a package including source code for basic routines and
  a testbed to demonstrate how to access DCI 16-Port Photo/Rely USB Adapter. 
  If you would like to develop your applications upon DCI 16-Port Photo/Rely
  USB Adapter, you can reference the basic routines and testbed.

  - basic routines: dcihid.c

  - testbed: main.c


. How to build and run the testbed, test_dcihid

  - to build test_dcihid
    % make

  - to run test_dcihid
    # ./test_dcihid 	[it is necessary to run as root]


. This is only a read/write demonstration for product USB 16 Photo In/Relay Out Board.
	If you want to access our other product, please change define of card_id by following table
	
	USB_16PIO		0x01
	USB_LABKIT	0x02
	USB_16PR		0x03
	USB_14ADDA	0x05
	USB_8PR			0x06
	USB_4PR	  	0x07
	USB_8PI			0x08
	USB_8RO			0x09
	USB_16PI		0x0A
	USB_16RO		0x0B
	USB_32PI		0x0C
	USB_32RO		0x0D

	Example: 
	
		If you want to access product USB_8RR and its switch num on board is 10.
		
		You can use "dcihid_open" to get handle.
		
			#define DCIHID_8PR_CARDID	6
			#define DCIHID_8PR_CARDNO	10
		
	 		dcihid_handle = dcihid_open(linux_hiddev[i], DCIHID_8PR_CARDID, DCIHID_8PR_CARDNO);
	
		And after getting the handle, you can use "dcihid_write & dcihid_read" to write/read
	
			dcihid_write(dcihid_handle, out_port, 0x01 << i);
			dcihid_read(dcihid_handle, in_port, &data);
			
		Finally you can use "dcihid_close" to release the device.
		
			dcihid_close(dcihid_handle);
			
			
	You can find more about our products on www.decision.com.tw
	And if you have any question or option about our products
	Please contact us by e-mail at decision@decision.com.tw			
	
	