xpci3xxx: General functions

xpci3xxx 1.00.00

Macros
General functions

## Macros
#define | CMD_xpci3xxx_GetHardwareInformation _IOR(xpci3xxx_MAGIC, 1,long)
| Returns the informations of base address, IRQ to the user.
#define | CMD_xpci3xxx_TestInterrupt _IOR(xpci3xxx_MAGIC, 2,long)
| Retrieve information about the older event in the event FIFO.
#define | CMD_xpci3xxx_SetTTLPortConfiguration _IOR(xpci3xxx_MAGIC, 3,long)
| Configures the bidirectional TTL I/O.
#define | CMD_xpci3xxx_ReadEepromHeader_SerialNumber _IOR(xpci3xxx_MAGIC, 4,long)
| Read the serial number from the Eeprom Header.
#define | CMD_xpci3xxx_GetFirmwareVersion _IOR(xpci3xxx_MAGIC, 5,long)
| Read the firmware version from the FPGA.

## Detailed Description

## Macro Definition Documentation

## ◆ CMD_xpci3xxx_GetFirmwareVersion

#define CMD_xpci3xxx_GetFirmwareVersion _IOR(xpci3xxx_MAGIC, 5,long)

Read the firmware version from the FPGA.

Parameters

  [out] | uint32_t | arg Firmware version of the board

Return values

  0 | Success
  -1 | Error

Definition at line 428 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_GetHardwareInformation

#define CMD_xpci3xxx_GetHardwareInformation _IOR(xpci3xxx_MAGIC, 1,long)

Returns the informations of base address, IRQ to the user.

Parameters

  [out] | (struct | xpci3xxx_USER_str_BoardInformations)

Deprecated:

Definition at line 349 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_ReadEepromHeader_SerialNumber

#define CMD_xpci3xxx_ReadEepromHeader_SerialNumber _IOR(xpci3xxx_MAGIC, 4,long)

Read the serial number from the Eeprom Header.

Parameters

  [out] | uint32_t | arg Serial Number of the board

Return values

  0 | Success
  -1 | Error

Definition at line 419 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_SetTTLPortConfiguration

#define CMD_xpci3xxx_SetTTLPortConfiguration _IOR(xpci3xxx_MAGIC, 3,long)

Configures the bidirectional TTL I/O.

TTL I/O are grouped in three ports:

- port 1 = 8 TTL inputs
- port 2 = 8 TTL outputs
- port 3 = 8 TTL bi-directional, which can be either input or output

This command allows to configure each TTL I/O of port 3 in either input or output.

Parameters

  [in] | uint8_t*arg | = 0 input (default) | 1 : output

Return values

  0 | : Success
  1 | : Internal error
  2 | : TTL functionality not supported

Note
  the content of the register that contains the state of these TTLs is not synchronized by this command. After changing this setting from output as input the command CMD_xpci3xxx_Read32DigitalInputs must be called twice.

Definition at line 410 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_TestInterrupt

#define CMD_xpci3xxx_TestInterrupt _IOR(xpci3xxx_MAGIC, 2,long)

Retrieve information about the older event in the event FIFO.

Events such as interrupts are stored in a FIFO of size ADDIDATA_MAX_EVENT_COUNTER. This function retrieve the older information present in the FIFO and frees the corresponding slot.

Parameters

  [out] | uint32_t[1 | + ADDIDATA_MAX_AI + 1 + ADDIDATA_MAX_INTERRUPT_ANALOG_INPUT_VALUE]

index 0 of the array contains the source of the interrupt. It may take the following values:

    0xfffffffe  FIFO is Empty
    0xffffffff  FIFO is Full
    0x1         Analog input with DMA
    0x2         Analog input without DMA
    0x4         Analog input FIFO Overflow
    0x10        TimerCounterWatchdog 0
    0x20        TimerCounterWatchdog 1
    0x40        TimerCounterWatchdog 2
    0x100       TimerCounterWatchdog 0
    0x200       TimerCounterWatchdog 1
    0x400       TimerCounterWatchdog 2
    0x1000      TimerCounterWatchdog 0
    0x2000      TimerCounterWatchdog 1
    0x4000      TimerCounterWatchdog 2

If the interrupt has been generated by analog input, without DMA (0x2), then the array index from 1 to (ADDIDATA_MAX_AI+1) is filled with the values acquired. Only the indexes corresponding to actual inputs are significant.

If the interrupt has been generated by analog input using DMA (0x1), then the array index from (ADDIDATA_MAX_AI+2) to (ADDIDATA_MAX_AI+2+ADDIDATA_MAX_INTERRUPT_ANALOG_INPUT_VALUE) is filled with the values acquired. Only the indexes corresponding to actual inputs are significant.

Return values

  0 | success
  -1 | an error happened and errno is set appropriately.

Definition at line 388 of file xpci3xxx.h.