PIO-D24
Visitor 445 |
Last updated Wednesday, 13-Aug-2003 13:50:27 CST |
Source Codes Tour
Device File
ioctl Commands
Data Types
Registers
Examples
/dev/ixpion
The n is the PIO device number.
- IXPIO_GET_INFO
- Retrieve a device's information, and put it into the ixpio_devinfo (ixpio_devinfo_t) structure.
- IXPIO_REG_READ
- Read a specified register's value, and put the value into the ixpio_reg (ixpio_reg_t) structure.
- IXPIO_REG_WRITE
- Write a given value to a specified register.
- IXPIO_SIG
- Set an interrupt signal plan. If there already signal plans are listed, This command will remove them all then install the new one.
- IXPIO_SIG_ADD
- Add an interrupt signal plan. If there already signal plans are listed, this command will append the new one to the list.
- IXPIO_SIG_DEL
- Delete the specified signal plan.
- IXPIO_SIG_DEL_ALL
- Delete all signal plans listed in the device.
- IXPIO_KEEP_ALIVE
- This command prevent the signal plans or analog output patterns to be deleted when closing the device.
- IXPIO_NO_KEEP_ALIVE
- Cancel the KEEP_ALIVE command.
- ixpio_devinfo_t
- The data type of structure ixpio_devinfo which contains information to represent a device (card). This structure is generally used by the ioctl IXPIO_GET_INFO command.
- ixpio_reg_t
- The data type of structure ixpio_reg that contains a register's id and value. This structure is used by the ioctl IXPIO_REG* commands.
- ixpio_signal_t
- The data type of structure ixpio_signal that contains process id, signal id, and signaling condictions. This structure is used by the ioctl IXPIO_SIG* commands.
Available registers which can be used in structure ixpio_reg for the PIO-D24.
- IXPIO_RCR
- Reset Control Register (R/W)
- IXPIO_ACR
- AUX Control Register (R/W)
- IXPIO_ADR
- AUX Data Register (R/W)
- IXPIO_IMCR
- INT Mask Control Register (R/W)
- IXPIO_ASR
- AUX Pin Status Register (R/W) The ASR is directly handled by device driver. Write to the register is not recommended! Instead of directly write to it, use the IXPIO_SIG ioctl command to set the interrupt signaling condictions.
- IXPIO_IPCR
- Interrupt Polarity Control Register (R/W) The IPCR is directly heandled by device driver. Write to the register is not recommended! Instead of directly write to it, use the IXPIO_SIG ioctl command to set the interrupt signaling condictions.
- IXPIO_Pn
- Port n. The n is the port number. For example, the IXPIO_P0 represents the Port 0. The maximum value of the n is depended on the device (card) you are using, which can be found from the hardware manual.
- IXPIO_PC[a]
- Port Configuration [a]. The [a] is an option to specify the configuration-port. For example, the IXPIO_PCA generally represents the configuration for port 0 to 2, the IXPIO_PCB represents the configuration for port 3 to 5, and so on in the same rule. Omit the [a], the IXPIO_PC is identical to the IXPIO_PCA. Some devices (cards) have 3 configuration ports, some have only 1, which can be found from the hardware manual.
- list.c
- An example for gatting device information.
- piod24/port.c
- An example for IO ports operating.
- piod24/int.c
- An example for interrupt handling. This program configures driver to send signals in same signal id for the four interrupt channels.
Emmy Tsai <emmy@icpdas.com> | We are at Your Service <service@icpdas.com>