background image

The Embedded I/O Company

TIP675-SW-42

VxWorks Device Driver

48 TTL I/O Lines with Interrupts

Version 1.2.x

User Manual

Issue 1.2.1

June 2008

TEWS TECHNOLOGIES GmbH

TEWS TECHNOLOGIES LLC

Am Bahnhof 7
25469 Halstenbek, Germany
www.tews.com

Phone: +49 (0) 4101 4058 0
Fax: +49 (0) 4101 4058 19
e-mail: [email protected]

9190 Double Diamond Parkway,
Suite 127, Reno, NV 89521, USA
www.tews.com

Phone: +1 (775) 850 5830
Fax: +1 (775) 201 0347
e-mail: [email protected]

Содержание TIP675-SW-42

Страница 1: ...Issue 1 2 1 June 2008 TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC Am Bahnhof 7 25469 Halstenbek Germany www tews com Phone 49 0 4101 4058 0 Fax 49 0 4101 4058 19 e mail info tews com 9190 Double Dia...

Страница 2: ...lete However TEWS TECHNOLOGIES GmbH reserves the right to change the product described in this document at any time without notice TEWS TECHNOLOGIES GmbH is not liable for any damage arising out of th...

Страница 3: ...r in Tornado IDE project 6 2 2 System resource requirement 7 3 I O SYSTEM FUNCTIONS 8 3 1 tip675Drv 8 3 2 tip675DevCreate 10 4 I O FUNCTIONS 13 4 1 open 13 4 2 close 15 4 3 ioctl 17 4 3 1 FIO_T675_SET...

Страница 4: ...cludes the following functions reading the input register writing the output register programming direction of every I O line configure simultaneous update feature connect interrupt callback functions...

Страница 5: ...AC Carrier Driver CARRIER SW 42 is part of this TIP675 SW 42 distribution It is located in directory CARRIER SW 42 on the corresponding distribution media This IPAC Device Driver requires a properly i...

Страница 6: ...rmation ChangeLog txt Release history 2 1 Include device driver in Tornado IDE project For Including the TIP675 SW 42 device driver into a Tornado IDE project follow the steps below 1 Copy the files f...

Страница 7: ...phores Memory and Stack usage may differ from system to system depending on the used compiler and its setup The following formula shows the way to calculate the common requirements of the driver and d...

Страница 8: ...tip675Drv installs the TIP675 driver in the I O system SYNOPSIS include tip675 h STATUS tip675Drv void DESCRIPTION This function initializes the TIP675 driver and installs it in the I O system The cal...

Страница 9: ...e 9 of 31 ERROR CODES The error codes are stored in errno and can be read with the function errnoGet The error code is a standard error code set by the I O system see VxWorks Reference Manual SEE ALSO...

Страница 10: ...tion must be called before performing any I O request to this device PARAMETER name This string specifies the name of the device that will be used to identify the device for example for open calls dev...

Страница 11: ...retrieved by CARRIER Driver ipFindDevice function EXAMPLE include tip675 h STATUS result TIP675_DEVCONFIG tip675Conf struct ipac_resource ipac IPAC CARRIER Driver initialization Find an IP module fro...

Страница 12: ...e stored in errno ERROR CODES The error codes are stored in errno and can be read with the function errnoGet Error code Description S_ioLib_NO_DRIVER Driver not installed run tip675Drv S_tip675Drv_IAR...

Страница 13: ...int open const char name int flags int mode DESCRIPTION Before I O can be performed to the TIP675 device a file descriptor must be opened by invoking the basic I O function open PARAMETER name Specifi...

Страница 14: ...Handle error RETURNS A device descriptor number or ERROR if the function fails an error code will be stored in errno ERROR CODES The error codes are stored in errno and can be read with the function e...

Страница 15: ...e SYNOPSIS int close int fd DESCRIPTION This function closes opened devices PARAMETER fd This file descriptor specifies the device to be closed The file descriptor has been returned by the open functi...

Страница 16: ...ERROR if the function fails an error code will be stored in errno ERROR CODES The error codes are stored in errno and can be read with the function errnoGet The error code is a standard error code set...

Страница 17: ...uide I O system PARAMETER fd This file descriptor specifies the device to be used The file descriptor has been returned by the open function request This argument specifies the function that shall be...

Страница 18: ...e function RETURNS Function dependent value described with the function or ERROR if the function fails an error code will be stored in errno ERROR CODES The error codes are stored in errno and can be...

Страница 19: ...direction mask T675_DIRECTION_STR will be passed in the ioctl argument arg to the driver typedef struct unsigned short dir_1_16 unsigned short dir_17_32 unsigned short dir_33_48 T675_DIRECTION_STR di...

Страница 20: ...ection Line 1 24 output Line 25 32 input dBuf out_1_16 0xFFFF dBuf out_17_32 0x00FF dBuf out_33_48 0x0000 retval ioctl fd FIO_T675_SET_DIR int dBuf if retval ERROR handle function specific error condi...

Страница 21: ...g line unsigned long arg base Base address of the IP s I O space inBuf Current content of the IP s input registers for a buffer description refer to the FIO_T675_READ ioctl function line I O line at w...

Страница 22: ...ned argument will be passed in the 4 th argument to the user supplied callback function This argument could be a semaphore ID a message ID or whatever funcPtr This parameter contains a pointer to a fu...

Страница 23: ...GE IsfPar funcPtr callback IsfPar arg 0 retval ioctl fd FIO_T675_INSTALL_ISF int IsfPar if retval ERROR handle function specific error conditions ERRORS S_t675Drv_ILINE Specified I O line out of range...

Страница 24: ...r and the edge must be passed in the ioctl argument arg to the driver typedef struct unsigned short io_line unsigned short edge T675_REMOVE_ISF_STR io_line I O line specifying the callback function to...

Страница 25: ...O line 24 Interrupt on hi transition RsfPar io_line 24 RsfPar edge T675_POS_EDGE retval ioctl fd FIO_T675_REMOVE_ISF int RsfPar if retval ERROR handle function specific error conditions ERRORS S_t675D...

Страница 26: ...the inputs and outputs to be latched on the rising edge of the external clock while setting arg to T675_NEG_EDGE will latch the inputs and outputs on the falling edge EXAMPLE include tip675 h int fd...

Страница 27: ...IP675 After driver startup the simultaneous update feature is disabled The optional argument must be set to 0 EXAMPLE include tip675 h int fd int retval Disable simultaneous update of inputs and outpu...

Страница 28: ...struct unsigned short in_1_16 unsigned short in_17_32 unsigned short in_33_48 T675_READ_STR in_1_16 Returns the content of the input register for I O line 1 up to 16 Line 1 is assigned to bit 0 line 2...

Страница 29: ...fd retval ioctl fd FIO_T675_READ int rBuf if retval ERROR handle function specific error conditions else printf Input 1 16 04X n rBuf in_1_16 printf Input 17 32 04X n rBuf in_17_32 printf Input 33 48...

Страница 30: ...rt out_1_16 unsigned short out_17_32 unsigned short out_33_48 T675_WRITE_STR out_1_16 Specifies the output value that will be written into the output register for I O line 1 up to 16 Line 1 is assigne...

Страница 31: ...s 48 1 of the device associated with fd wBuf out_1_16 0x9abc wBuf out_17_32 0x5678 wBuf out_33_48 0x1234 retval ioctl fd FIO_T675_WRITE int wBuf if retval ERROR handle function specific error conditio...

Отзывы: