Tews Technologies TDRV006-SW-82 User Manual Download Page 1

The Embedded I/O Company

TDRV006-SW-82

Linux Device Driver

64 Digital Inputs/Outputs (Bit I/O)

Version 2.0.x

User Manual

Issue 2.0.1

December 2017

TEWS TECHNOLOGIES GmbH

Am Bahnhof 7

25469 Halstenbek, Germany

Phone: +49 (0) 4101 4058 0

Fax: +49 (0) 4101 4058 19

e-mail: [email protected]

www.tews.com

Summary of Contents for TDRV006-SW-82

Page 1: ...ux Device Driver 64 Digital Inputs Outputs Bit I O Version 2 0 x User Manual Issue 2 0 1 December 2017 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek Germany Phone 49 0 4101 4058 0 Fax 49 0 4101...

Page 2: ...s 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 describe...

Page 3: ...Change Major Device Number 7 2 5 Configuration 7 2 6 3 API DOCUMENTATION 8 General Functions 8 3 1 3 1 1 tdrv006Open 8 3 1 2 tdrv006Close 10 Device Access Functions 12 3 2 3 2 1 tdrv006Read 12 3 2 2...

Page 4: ...g to output buffers masked and unmasked Setting I O bits individually Waiting for input transition events Configuring I O direction The TDRV006 SW 82 supports the modules listed below TPMC681 64 Digit...

Page 5: ...file example tdrv006exa c Example application example Makefile Example application make file include config h Driver independent configuration header file include tpmodule h Driver and kernel independ...

Page 6: ...reating and destroying of device nodes in its responsibility sh makenode On success the device driver will create a minor device for each compatible channel found The first PMC module can be accessed...

Page 7: ...mber allocation Example define TDRV006_MAJOR 122 Be sure that the desired major number is not used by other drivers Please check proc devices to see which numbers are free Keep in mind that it is nece...

Page 8: ...n be performed to a device a device descriptor must be opened by a call to this function PARAMETERS DeviceName This parameter points to a null terminated string that specifies the name of the device T...

Page 9: ...ce Driver Page 9 of 31 RETURNS A device handle or NULL if the function fails An error code will be stored in errno ERROR CODES The error codes are stored in errno The error code is a standard error co...

Page 10: ...LE hdl DESCRIPTION This function closes previously opened devices PARAMETERS hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function EX...

Page 11: ...age 11 of 31 RETURNS On success TDRV006_OK is returned In the case of an error the appropriate error code is returned by the function ERROR CODES Error Code Description TDRV006_ERR_INVALID_HANDLE The...

Page 12: ...I O lines PARAMETER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function in31_0 This argument points to a buffer where the current...

Page 13: ...t tdrv006Read hdl in_low in_high if result TDRV006_OK handle error else printf INPUT 0x 08X 08X n in_high in_low RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate...

Page 14: ...r on the I O lines which are configured for output PARAMETER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function out31_0 This argum...

Page 15: ...ut value set I O lines 0 15 result tdrv006Write hdl 0x0000FFFF 0x00000000 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate err...

Page 16: ...ured for output PARAMETER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function out31_0 This argument specifies the output value for...

Page 17: ...that the old output value will not be changed EXAMPLE include tdrv006api h TDRV006_HANDLE hdl TDRV006_STATUS result Set a part of the output value set reset I O lines 0 15 and 48 63 result tdrv006Writ...

Page 18: ...t outputLine DESCRIPTION This function sets a single bit of the output value This specified value will only appear if the corresponding I O line is configured for output PARAMETER hdl This value speci...

Page 19: ...lt tdrv006SetOutputLine hdl 32 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate error code is returned by the function ERROR C...

Page 20: ...int outputLine DESCRIPTION This function resets a single bit of the output value This specified value will only appear if the corresponding I O line is configured for output PARAMETER hdl This value s...

Page 21: ...lt tdrv006ClearOutputLine hdl 32 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate error code is returned by the function ERROR...

Page 22: ...ER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function enaout31_0 This argument specifies the direction of I O lines 0 up to 31 Bit...

Page 23: ...O lines 0 8 for ouput result tdrv006OutputEnable hdl 0x000001FF 0x00000000 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate er...

Page 24: ...cified timeout time has passed PARAMETER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function inputLine This argument specifies the...

Page 25: ...hdl 0 10000 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate error code is returned by the function ERROR CODES Error Code Des...

Page 26: ...time has passed PARAMETER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function inputLine This argument specifies the input line whi...

Page 27: ...hdl 0 10000 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate error code is returned by the function ERROR CODES Error Code Des...

Page 28: ...meout time has passed PARAMETER hdl This value specifies the device handle to the hardware module retrieved by a call to the corresponding open function inputLine This argument specifies the input lin...

Page 29: ...0000 if result TDRV006_OK error handling RETURN VALUE On success TDRV006_OK is returned In the case of an error the appropriate error code is returned by the function ERROR CODES Error Code Descriptio...

Page 30: ...er see also the proc man pages lspci v 04 01 0 Signal processing controller TEWS Technologies GmbH Device 02a9 Subsystem TEWS Technologies GmbH Device 000a Flags medium devsel IRQ 16 Memory at feb9fc0...

Page 31: ...ci_hcd usb2 42 354 383 PCI MSI edge radeon 43 98 95 PCI MSI edge snd_hda_intel 44 19 21 PCI MSI edge snd_hda_intel NMI 3 3 Non maskable interrupts LOC 9705 9516 Local timer interrupts SPU 0 0 Spurious...

Reviews: