Do you have a question about the TIP675-SW-42 and is the answer not in the manual?
Questions and answers
Subscribe to Our Youtube Channel
Summary of Contents for Tews Technologies TIP675-SW-42
Page 1
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 Phone: +49 (0) 4101 4058 0 9190 Double Diamond Parkway, Phone: +1 (775) 850 5830...
Page 2
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 the application or use of the device described herein.
1 Introduction 1.1 Device Driver The TIP675-SW-42 VxWorks device driver software allows the operation of the TIP675 IP conforming to the VxWorks I/O system specification. This includes a device-independent basic I/O interface with open(), close() and ioctl() functions. The TIP675 driver includes the following functions: ...
IndustryPack I/O and memory spaces. To simplify the implementation of IPAC device drivers which work with any supported carrier board, TEWS TECHNOLOGIES has designed a so called Carrier Driver that hides all differences of different carrier boards under a well defined interface.
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 from the distribution media into a subdirectory in your project path.
<total requirement> = <driver requirement> + (<number of devices> * <device requirement>) The maximum usage of some resources is limited by adjustable parameters. If the application and driver exceed these limits, increase the according values in your project. TIP675-SW-42 – VxWorks Device Driver Page 7 of 31...
I/O request. EXAMPLE #include "tip675.h” /*------ Initialize Driver -----*/ status = tip675Drv(); if (status == ERROR) /* Error handling */ RETURNS OK, or ERROR if the function fails. TIP675-SW-42 – VxWorks Device Driver Page 8 of 31...
Page 9
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 VxWorks Programmer’s Guide: I/O System TIP675-SW-42 – VxWorks Device Driver Page 9 of 31...
IPAC CARRIER ipFindDevice() function will find the devices. For TIP675 devices there is only one devIdx per hardware module starting with devIdx = 0. funcType This parameter is unused and should be set to 0. TIP675-SW-42 – VxWorks Device Driver Page 10 of 31...
Page 11
/* IPAC CARRIER Driver initialization */ … Find an IP module from TEWS TECHNOLOGIES (manufacturer = 0xB3) with model number MODEL_TIP675 (see tip675.h). This module does not use interrupts and we need only the IO space base address for the related driver.
Page 12
S_ioLib_DEVICE_ERROR Device error. The certain TIP675 device seems to be faulty or isn’t a TIP675 device at all. S_tdrv002Drv_EXISTS Device has already been created SEE ALSO VxWorks Programmer’s Guide: I/O System TIP675-SW-42 – VxWorks Device Driver Page 12 of 31...
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 Specifies the device which shall be opened, the name specified in tip675DevCreate() must be used flags Not used mode Not used TIP675-SW-42 – VxWorks Device Driver Page 13 of 31...
Page 14
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 ioLib, basic I/O routine - open() TIP675-SW-42 – VxWorks Device Driver Page 14 of 31...
This file descriptor specifies the device to be closed. The file descriptor has been returned by the open() function. EXAMPLE int fd; int retval; … /*---------------- close the device ----------------*/ retval = close(fd); if (retval == ERROR) /* Handle error */ … TIP675-SW-42 – VxWorks Device Driver Page 15 of 31...
Page 16
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 ioLib, basic I/O routine - close() TIP675-SW-42 – VxWorks Device Driver Page 16 of 31...
FIO_T675_REMOVE_ISF Remove user supplied I/O service function from specified I/O line FIO_T675_ENA_EXCLK Enable simultaneous update feature FIO_T675_DIS_EXCLK Disable simultaneous update feature FIO_T675_READ Read from input buffer FIO_T675_WRITE Write to output buffer TIP675-SW-42 – VxWorks Device Driver Page 17 of 31...
Page 18
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 ioLib, basic I/O routine - ioctl() TIP675-SW-42 – VxWorks Device Driver Page 18 of 31...
Specifies the line direction for I/O-line 17 up to 32. (Line 17 is assigned to bit 0, line 18 to bit 1 and so on.) dir_33_48 Specifies the line direction for I/O-line 33 up to 48. (Line 33 is assigned to bit 0, line 34 to bit 1 and so on.) TIP675-SW-42 – VxWorks Device Driver Page 19 of 31...
Page 20
(retval == ERROR) /* handle function specific error conditions */ … ERRORS No function specific error codes. SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System. TIP675-SW-42 – VxWorks Device Driver Page 20 of 31...
A pointer to the caller's parameter buffer (T675_INSTALL_ISF_STR) must be passed by the argument arg to the driver. typedef struct unsigned short io_line; unsigned short edge; unsigned long arg; VOIDFUNCPTR funcPtr; } T675_INSTALL_ISF_STR; TIP675-SW-42 – VxWorks Device Driver Page 21 of 31...
Page 22
/* Low Word: 1 – 48 */ /* High Word: [T675_POS_EDGE| T675_LOW_EDGE] */ T675_READ_STR *pvalue, /* Read value */ unsigned long arg /* User argument */ … … TIP675-SW-42 – VxWorks Device Driver Page 22 of 31...
Page 23
This I/O line and edge combination is already occupied. Call the ioctl function FIO_T675_REMOVE_ISF to remove the previous installed callback function. SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System. TIP675-SW-42 – VxWorks Device Driver Page 23 of 31...
Specifies the edge on which the callback function is called that shall be removed. Valid values are: Value Description T675_POS_EDGE The interrupt will be generated on a Low to High transition T675_NEG_EDGE The interrupt will be generated on a High to Low transition TIP675-SW-42 – VxWorks Device Driver Page 24 of 31...
Page 25
/* handle function specific error conditions */ … ERRORS S_t675Drv_ILINE Specified I/O line out of range. S_t675Drv_IPARAM No valid transition parameter SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System. TIP675-SW-42 – VxWorks Device Driver Page 25 of 31...
(retval == ERROR) { /* handle function specific error conditions */ … ERRORS No function specific error codes. SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System. TIP675-SW-42 – VxWorks Device Driver Page 26 of 31...
(retval == ERROR) /* handle function specific error conditions */ … ERRORS No function specific error codes. SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System. TIP675-SW-42 – VxWorks Device Driver Page 27 of 31...
18 to bit 1 and so on.) in_33_48 Returns the content of the input register for I/O-line 33 up to 48. (Line 33 is assigned to bit 0, line 34 to bit 1 and so on.) TIP675-SW-42 – VxWorks Device Driver Page 28 of 31...
Page 29
“Input 33-48: %04X\n”, rBuf.in_33_48 ); … RETURNS ERROR if an error occurred or number of bytes read on success. SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System TIP675-SW-42 – VxWorks Device Driver Page 29 of 31...
Specifies the output value that will be written into the output register for I/O-line 33 up to 48. (Line 33 is assigned to bit 0, line 34 to bit 1 and so on.) TIP675-SW-42 – VxWorks Device Driver Page 30 of 31...
Page 31
/* handle function specific error conditions */ … RETURNS ERROR if an error occurred or the number of bytes written on success SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System TIP675-SW-42 – VxWorks Device Driver Page 31 of 31...
Need help?
Do you have a question about the TIP675-SW-42 and is the answer not in the manual?
Questions and answers