mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-22 01:53:54 +08:00
Fixed mail address; limited lines to 78 characters; removed $Id$.
This commit is contained in:
+11
-13
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,7 +18,7 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -35,14 +33,14 @@
|
||||
#include "ioctl.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
unsigned int ecrt_version_magic(void)
|
||||
{
|
||||
return ECRT_VERSION_MAGIC;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_master_t *ecrt_request_master(unsigned int master_index)
|
||||
{
|
||||
@@ -58,7 +56,7 @@ ec_master_t *ecrt_request_master(unsigned int master_index)
|
||||
return master;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#define MAX_PATH_LEN 64
|
||||
|
||||
@@ -122,7 +120,7 @@ out_clear:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_release_master(ec_master_t *master)
|
||||
{
|
||||
@@ -130,7 +128,7 @@ void ecrt_release_master(ec_master_t *master)
|
||||
free(master);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
float ecrt_read_real(const void *data)
|
||||
{
|
||||
@@ -138,7 +136,7 @@ float ecrt_read_real(const void *data)
|
||||
return *(float *) (const void *) &raw;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
double ecrt_read_lreal(const void *data)
|
||||
{
|
||||
@@ -146,18 +144,18 @@ double ecrt_read_lreal(const void *data)
|
||||
return *(double *) (const void *) &raw;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_write_real(void *data, float value)
|
||||
{
|
||||
*(uint32_t *) data = cpu_to_le32(*(uint32_t *) (void *) &value);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_write_lreal(void *data, double value)
|
||||
{
|
||||
*(uint64_t *) data = cpu_to_le64(*(uint64_t *) (void *) &value);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user