Basic Syscall API
[Level 0 API (Syscall API)]

Collaboration diagram for Basic Syscall API:


Functions

int a4l_sys_open (const char *fname)
 Open an Analogy device.
int a4l_sys_close (int fd)
 Close an Analogy device.
int a4l_sys_read (int fd, void *buf, size_t nbyte)
 Read from an Analogy device.
int a4l_sys_write (int fd, void *buf, size_t nbyte)
 Write to an Analogy device.


Function Documentation

int a4l_sys_close ( int  fd  ) 

Close an Analogy device.

Parameters:
[in] fd File descriptor as returned by a4l_sys_open()
Returns:
0 on success, otherwise a negative error code.

Referenced by a4l_close(), and a4l_open().

int a4l_sys_open ( const char *  fname  ) 

Open an Analogy device.

Parameters:
[in] fname Device name
Returns:
Positive file descriptor value on success, otherwise a negative error code.

Referenced by a4l_open().

int a4l_sys_read ( int  fd,
void *  buf,
size_t  nbyte 
)

Read from an Analogy device.

The function a4l_read() is only useful for acquisition configured through an Analogy command.

Parameters:
[in] fd File descriptor as returned by a4l_sys_open()
[out] buf Input buffer
[in] nbyte Number of bytes to read
Returns:
Number of bytes read. Otherwise:
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -ENOENT is returned if the device's reading subdevice is idle (no command was sent)
  • -EFAULT is returned if a user <-> kernel transfer went wrong
  • -EINTR is returned if calling task has been unblocked by a signal

Referenced by a4l_async_read().

int a4l_sys_write ( int  fd,
void *  buf,
size_t  nbyte 
)

Write to an Analogy device.

The function a4l_write() is only useful for acquisition configured through an Analogy command.

Parameters:
[in] fd File descriptor as returned by a4l_sys_open()
[in] buf Output buffer
[in] nbyte Number of bytes to write
Returns:
Number of bytes written. Otherwise:
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -ENOENT is returned if the device's writing subdevice is idle (no command was sent)
  • -EFAULT is returned if a user <-> kernel transfer went wrong
  • -EINTR is returned if calling task has been unblocked by a signal

Referenced by a4l_async_write().


Generated on Tue Mar 8 13:02:08 2011 for Xenomai API by  doxygen 1.5.6