Xenomai 3.3.2
Loading...
Searching...
No Matches
Synchronous acquisition API

Data Structures

struct  a4l_instruction
 Structure describing the synchronous instruction. More...
 
struct  a4l_instruction_list
 Structure describing the list of synchronous instructions. More...
 

Macros

#define A4L_INSN_WAIT_MAX   100000
 Maximal wait duration.
 

Functions

int a4l_snd_insnlist (a4l_desc_t *dsc, a4l_insnlst_t *arg)
 Perform a list of synchronous acquisition misc operations.
 
int a4l_snd_insn (a4l_desc_t *dsc, a4l_insn_t *arg)
 Perform a synchronous acquisition misc operation.
 

Instruction type

Flags to define the type of instruction

#define A4L_INSN_READ   (0 | A4L_INSN_MASK_READ)
 Read instruction.
 
#define A4L_INSN_WRITE   (1 | A4L_INSN_MASK_WRITE)
 Write instruction.
 
#define A4L_INSN_BITS
 "Bits" instruction
 
#define A4L_INSN_CONFIG
 Configuration instruction.
 
#define A4L_INSN_GTOD
 Get time instruction.
 
#define A4L_INSN_WAIT
 Wait instruction.
 
#define A4L_INSN_INTTRIG
 Trigger instruction (to start asynchronous acquisition)
 

Detailed Description

Function Documentation

◆ a4l_snd_insn()

int a4l_snd_insn ( a4l_desc_t dsc,
a4l_insn_t arg 
)

Perform a synchronous acquisition misc operation.

The function a4l_snd_insn() triggers a synchronous acquisition.

Parameters
[in]dscDevice descriptor filled by a4l_open() (and optionally a4l_fill_desc())
[in]argInstruction structure
Returns
0 on success. Otherwise:
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -EFAULT is returned if a user <-> kernel transfer went wrong
  • -ENOMEM is returned if the system is out of memory

References a4l_descriptor::fd.

Referenced by a4l_config_subd(), a4l_sync_dio(), a4l_sync_read(), and a4l_sync_write().

◆ a4l_snd_insnlist()

int a4l_snd_insnlist ( a4l_desc_t dsc,
a4l_insnlst_t arg 
)

Perform a list of synchronous acquisition misc operations.

The function a4l_snd_insnlist() is able to send many synchronous instructions on a various set of subdevices, channels, etc.

Parameters
[in]dscDevice descriptor filled by a4l_open() (and optionally a4l_fill_desc())
[in]argInstructions list structure
Returns
0 on success. Otherwise:
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -EFAULT is returned if a user <-> kernel transfer went wrong
  • -ENOMEM is returned if the system is out of memory

References a4l_descriptor::fd.

Referenced by a4l_sync_read(), and a4l_sync_write().