IgH EtherCAT Master  1.6.2
rtdm.c File Reference

RTDM interface. More...

Go to the source code of this file.

Macros

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

Functions

static int ec_rtdm_open (struct rtdm_dev_context *context, rtdm_user_info_t *user_info, int oflags)
 Driver open. More...
 
static int ec_rtdm_close (struct rtdm_dev_context *context, rtdm_user_info_t *user_info)
 Driver close. More...
 
static int ec_rtdm_ioctl_nrt_handler (struct rtdm_dev_context *context, rtdm_user_info_t *user_info, unsigned int request, void __user *arg)
 Driver ioctl. More...
 
static int ec_rtdm_ioctl_rt_handler (struct rtdm_dev_context *, rtdm_user_info_t *, unsigned int, void __user *)
 
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()

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

Driver open.

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

Definition at line 131 of file rtdm.c.

◆ ec_rtdm_close()

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

Driver close.

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

Definition at line 161 of file rtdm.c.

◆ ec_rtdm_ioctl_nrt_handler()

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

Driver ioctl.

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

Definition at line 186 of file rtdm.c.

◆ ec_rtdm_ioctl_rt_handler()

static int ec_rtdm_ioctl_rt_handler ( struct rtdm_dev_context *  context,
rtdm_user_info_t *  user_info,
unsigned int  request,
void __user *  arg 
)
static
Parameters
contextContext.
user_infoUser data.
requestRequest.
argArgument.

Definition at line 206 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 59 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 108 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 238 of file rtdm.c.