PISO-DA2
Visitor 68 |
Last updated Friday, 26-Sep-2003 14:18:46 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_ANALOG_OUT
- The analog output command. The analog channel and data are defined in the given structure ixpio_analog.
- IXPIO_ANALOG_OUT_PAT
- Resets the analog output pattern. The analog pattern (waveform) is defined in the given structure ixpio_analog, and the output will be driven by interrupt.
- IXPIO_ANALOG_OUT_PAT_ADD
- Same as the IXPIO_ANALOG_OUT_PAT, but indtead of reseting the analog pattern, this command appends the new pattern to the last one if the old patterns are already there.
- IXPIO_ANALOG_OUT_PAT_START
- To enable a specified analog pattern for output.
- IXPIO_ANALOG_OUT_PAT_STOP IXPIO_ANALOG_OUT_PAT_PAUSE
- To disable a specified analog pattern.
- IXPIO_ANALOG_OUT_PAT_DEL
- To clear a specified analog pattern, release the allocated memory.
- IXPIO_ANALOG_OUT_PAT_STATUS
- Get a specified analog pattern status.
- IXPIO_ANALOG_OUT_PAT_RETRIEVE
- Retrieve a specified analog pattern.
- IXPIO_DATA_CLEAR
- Clears all of the analog patterns.
- IXPIO_DATA_START
- Starts to output the analog patterns.
- IXPIO_DATA_STOP
- Stop the output of the analog patterns.
- 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.
- ixpio_analog_t
- The data type of structure ixpio_analog that contains the analog channelassigment and data. This structure is generally used by the ioctl IXPIO_ANALOG_OUT* commands.
Available registers which can be used in structure ixpio_reg for the PIO-DA16/DA8/DA4.
- 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_8254C0 IXPIO_82541C0
- 8254 chip 1 counter 0 (R/W)
- IXPIO_8254C1 IXPIO_82541C1
- 8254 chip 1 counter 1 (R/W)
- IXPIO_8254C2 IXPIO_82541C2
- 8254 chip 1 counter 2 (R/W)
- IXPIO_8254CW IXPIO_82541CW
- 8254 chip 1 control word (R/W)
- IXPIO_DA1_L
- Analog output , low byte of Channel 1. (W)
- IXPIO_DA2_L
- Analog output, low byte of Channel 2. (W)
- IXPIO_DA1_H
- Analog output, high byte of Channel 1. (W)
- IXPIO_DA2_H
- Analog output, high byte of Channel 2. (W)
- IXPIO_JS
- Jumper Status Register (R)
- list.c
- An example for gatting device information.
- pisoda2/ao.c
- An example for analog output by writing to registers.
- pisoda2/ao2.c
- An example for analog output by the ioctl IXPIO_ANALOG_OUT command.
- pisoda2/ao_pat.c
- An example for analog output by interrupt driven analog patterns.
- pisoda2/counter.c
- An example for setting up an interrupt signaling condiction and on board 8254 counters.
Emmy Tsai <emmy@icpdas.com> | We are at Your Service <service@icpdas.com>