Author: Reed Lai
Description: PCI-TMC12 device driver for Linux
Keywords: driver,pci-1002,pcitmc12

# PCI-TMC12

Visitor 183 | Last updated Thursday, 20-Mar-2003 16:27:54 CST

Supported Models
PCI-1002 PCI-1202 PCI-1602 PCI-1800/1802 PCI-P16R16/P16C16/P16POR16 PCI-P8R8 PCI-TMC12

Source Code Tour for IxPCI
Device ID
Device File
ioctl Commands
Data Structures
Registers
Examples

### Device ID

PCI_TMC12

### Device File

/dev/ixpcin

The n is the IXPCI device number.

### ioctl Commands

IXPCI_GET_INFO
  Retrieve a device's information, and put it into the ixpci_devinfo (ixpci_devinfo_t) structure. Example: list.c.
IXPCI_READ_REG
  Read a specified register's value, and put the value into the ixpci_reg (ixpci_reg_t) structure. Example: ixpcitmc12/dio.c
IXPCI_WRITE_REG
  Write a given value to a specified register. Example: ixpcitmc12/dio.c
IXPCI_SET_SIG
  Set interrupt signaling condition. Example: pcitmc12/int.c
IXPCI_IOCTL_DI
  Digital input. Example: pcitmc12/dio2.c
IXPCI_IOCTL_DO
  Digital output. Example: pcitmc12/dio2.c
IXPCI_RESET
  Reset device.
  - Stop all timers
  - Write 0 to DO.
  - Disable interrupt
  Example: ixpcitmc12/rst.c

### Data Structures

ixpci_devinfo_t
  The data type of structure ixpci_devinfo which contains a device's id, base address, and so on. Example: list.c
ixpci_reg_t
  The data type of structure ixpci_reg which contains a register's id and value. Example: pcitmc12/*
ixpci_signal_t
  The data type of structure ixpci_signal that contains process id, signal id and signaling conditions. Example: pcitmc12/int.c

### Registers

R=Readable W=Writable

Available registers that can be used in structure ixpci_reg for PCI-TMC12.

IXPCI_PICR R W
  PCI Interrupt Control Register
IXPCI_8254C0 R W
  8254 Counter 0
IXPCI_8254C1 R W
  8254 Counter 0
IXPCI_8254C2 R W
  8254 Counter 2
IXPCI_8254CR R W
  8254 Control Register
IXPCI_8254CS R W
  8254 Chip Select
IXPCI_DI R W
  Digital Input
IXPCI_DO R W
  Digital Output

### Examples

list.c
  An example for ioctl command IXPCI_GET_INFO.
ixpcitmc12/dio.c
  An example for digital I/O.
ixpcitmc12/dio2.c
  An example for digital I/O by ioctl command IXPCI_IOCTL_DI/O.
pcitmc12/int.c
  An example for signaling interrupt operation.
pcitmc12/rst.c
  An example for ioctl command IXPCI_RESET.