IgH EtherCAT Master  1.5.3
rtdm.c File Reference

RTDM interface. More...

Go to the source code of this file.

Data Structures

struct  ec_rtdm_context_t
 Context structure for an open RTDM file handle. More...
 

Macros

#define DEBUG   0
 Set to 1 to enable device operations debugging.
 

Functions

int ec_rtdm_open (struct rtdm_dev_context *context, rtdm_user_info_t *user_info, int oflags)
 Driver open. More...
 
int ec_rtdm_close (struct rtdm_dev_context *context, rtdm_user_info_t *user_info)
 Driver close. More...
 
int ec_rtdm_ioctl (struct rtdm_dev_context *context, rtdm_user_info_t *user_info, unsigned int request, void __user *arg)
 Driver ioctl. More...
 
int ec_rtdm_dev_init (ec_rtdm_dev_t *rtdm_dev, ec_master_t *master)
 Initialize an RTDM device. More...
 
void ec_rtdm_dev_clear (ec_rtdm_dev_t *rtdm_dev)
 Clear an RTDM device. More...
 
int ec_rtdm_mmap (ec_ioctl_context_t *ioctl_ctx, void **user_address)
 Memory-map process data to user space. More...
 

Detailed Description

RTDM interface.

Definition in file rtdm.c.

Function Documentation

◆ ec_rtdm_open()

int ec_rtdm_open ( struct rtdm_dev_context *  context,
rtdm_user_info_t *  user_info,
int  oflags 
)

Driver open.

Returns
Always zero (success).
Parameters
contextContext.
user_infoUser data.
oflagsOpen flags.

Definition at line 141 of file rtdm.c.

◆ ec_rtdm_close()

int ec_rtdm_close ( struct rtdm_dev_context *  context,
rtdm_user_info_t *  user_info 
)

Driver close.

Returns
Always zero (success).
Parameters
contextContext.
user_infoUser data.

Definition at line 171 of file rtdm.c.

◆ ec_rtdm_ioctl()

int ec_rtdm_ioctl ( struct rtdm_dev_context *  context,
rtdm_user_info_t *  user_info,
unsigned int  request,
void __user *  arg 
)

Driver ioctl.

Returns
ioctl() return code.
Parameters
contextContext.
user_infoUser data.
requestRequest.
argArgument.

Definition at line 196 of file rtdm.c.

◆ ec_rtdm_dev_init()

int ec_rtdm_dev_init ( ec_rtdm_dev_t rtdm_dev,
ec_master_t master 
)

Initialize an RTDM device.

Returns
Zero on success, otherwise a negative error code.
Parameters
rtdm_devEtherCAT RTDM device.
masterEtherCAT master.

Definition at line 69 of file rtdm.c.

◆ ec_rtdm_dev_clear()

void ec_rtdm_dev_clear ( ec_rtdm_dev_t rtdm_dev)

Clear an RTDM device.

Parameters
rtdm_devEtherCAT RTDM device.

Definition at line 118 of file rtdm.c.

◆ ec_rtdm_mmap()

int ec_rtdm_mmap ( ec_ioctl_context_t *  ioctl_ctx,
void **  user_address 
)

Memory-map process data to user space.

Returns
Zero on success, otherwise a negative error code.
Parameters
ioctl_ctxContext.
user_addressUserspace address.

Definition at line 220 of file rtdm.c.