mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-24 02:53:57 +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);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+11
-13
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,14 +18,14 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
\file
|
||||
EtherCAT domain methods.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -37,14 +35,14 @@
|
||||
#include "domain.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_domain_clear(ec_domain_t *domain)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_domain_reg_pdo_entry_list(ec_domain_t *domain,
|
||||
const ec_pdo_entry_reg_t *regs)
|
||||
@@ -68,7 +66,7 @@ int ecrt_domain_reg_pdo_entry_list(ec_domain_t *domain,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
size_t ecrt_domain_size(const ec_domain_t *domain)
|
||||
{
|
||||
@@ -83,7 +81,7 @@ size_t ecrt_domain_size(const ec_domain_t *domain)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
uint8_t *ecrt_domain_data(ec_domain_t *domain)
|
||||
{
|
||||
@@ -104,7 +102,7 @@ uint8_t *ecrt_domain_data(ec_domain_t *domain)
|
||||
return domain->process_data;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_domain_process(ec_domain_t *domain)
|
||||
{
|
||||
@@ -117,7 +115,7 @@ void ecrt_domain_process(ec_domain_t *domain)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_domain_queue(ec_domain_t *domain)
|
||||
{
|
||||
@@ -130,7 +128,7 @@ void ecrt_domain_queue(ec_domain_t *domain)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_domain_state(const ec_domain_t *domain, ec_domain_state_t *state)
|
||||
{
|
||||
@@ -147,4 +145,4 @@ void ecrt_domain_state(const ec_domain_t *domain, ec_domain_state_t *state)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+5
-7
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,11 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_domain {
|
||||
ec_domain_t *next;
|
||||
@@ -33,8 +31,8 @@ struct ec_domain {
|
||||
uint8_t *process_data;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_domain_clear(ec_domain_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+7
-9
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,12 +18,12 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __EC_LIB_IOCTL_H__
|
||||
#define __EC_LIB_IOCTL_H__
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef USE_RTDM
|
||||
#include <rtdm/rtdm.h>
|
||||
@@ -33,11 +31,11 @@
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#include "master/ioctl.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef USE_RTDM
|
||||
|
||||
@@ -59,8 +57,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* __EC_LIB_IOCTL_H__ */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+2
-2
@@ -197,7 +197,7 @@ ec_slave_config_t *ecrt_master_slave_config(ec_master_t *master,
|
||||
return sc;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_master_select_reference_clock(ec_master_t *master,
|
||||
ec_slave_config_t *sc)
|
||||
@@ -740,7 +740,7 @@ void ecrt_master_sync_slave_clocks(ec_master_t *master)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_master_reference_clock_time(ec_master_t *master, uint32_t *time)
|
||||
{
|
||||
|
||||
+5
-7
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,11 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_master {
|
||||
int fd;
|
||||
@@ -35,8 +33,8 @@ struct ec_master {
|
||||
ec_slave_config_t *first_config;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_master_clear(ec_master_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2012-2019 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -18,13 +18,13 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/** \file
|
||||
* EtherCAT register request functions.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "slave_config.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_reg_request_clear(ec_reg_request_t *reg)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ uint8_t *ecrt_reg_request_data(ec_reg_request_t *reg)
|
||||
return reg->data;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_request_state_t ecrt_reg_request_state(ec_reg_request_t *reg)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ ec_request_state_t ecrt_reg_request_state(ec_reg_request_t *reg)
|
||||
return io.state;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_reg_request_write(ec_reg_request_t *reg, uint16_t address,
|
||||
size_t size)
|
||||
@@ -108,7 +108,7 @@ void ecrt_reg_request_write(ec_reg_request_t *reg, uint16_t address,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_reg_request_read(ec_reg_request_t *reg, uint16_t address,
|
||||
size_t size)
|
||||
@@ -128,4 +128,4 @@ void ecrt_reg_request_read(ec_reg_request_t *reg, uint16_t address,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+5
-7
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2012 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,11 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_reg_request {
|
||||
ec_reg_request_t *next; /**< List header. */
|
||||
@@ -34,8 +32,8 @@ struct ec_reg_request {
|
||||
size_t mem_size; /**< Size of \a data. */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_reg_request_clear(ec_reg_request_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+11
-11
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2019 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -18,13 +18,13 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/** \file
|
||||
* Canopen over EtherCAT SDO request functions.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "slave_config.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_sdo_request_clear(ec_sdo_request_t *req)
|
||||
{
|
||||
@@ -66,7 +66,7 @@ void ecrt_sdo_request_index(ec_sdo_request_t *req, uint16_t index,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_sdo_request_timeout(ec_sdo_request_t *req, uint32_t timeout)
|
||||
{
|
||||
@@ -84,21 +84,21 @@ void ecrt_sdo_request_timeout(ec_sdo_request_t *req, uint32_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
uint8_t *ecrt_sdo_request_data(ec_sdo_request_t *req)
|
||||
{
|
||||
return req->data;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
size_t ecrt_sdo_request_data_size(const ec_sdo_request_t *req)
|
||||
{
|
||||
return req->data_size;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_request_state_t ecrt_sdo_request_state(ec_sdo_request_t *req)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ ec_request_state_t ecrt_sdo_request_state(ec_sdo_request_t *req)
|
||||
return data.state;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_sdo_request_read(ec_sdo_request_t *req)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ void ecrt_sdo_request_read(ec_sdo_request_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_sdo_request_write(ec_sdo_request_t *req)
|
||||
{
|
||||
@@ -173,4 +173,4 @@ void ecrt_sdo_request_write(ec_sdo_request_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+5
-7
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,11 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_sdo_request {
|
||||
ec_sdo_request_t *next; /**< List header. */
|
||||
@@ -37,8 +35,8 @@ struct ec_sdo_request {
|
||||
size_t data_size; /**< Size of SDO data. */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_sdo_request_clear(ec_sdo_request_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+34
-34
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2019 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "voe_handler.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_slave_config_clear(ec_slave_config_t *sc)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ void ec_slave_config_clear(ec_slave_config_t *sc)
|
||||
sc->first_voe_handler = NULL;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_sync_manager(ec_slave_config_t *sc, uint8_t sync_index,
|
||||
ec_direction_t dir, ec_watchdog_mode_t watchdog_mode)
|
||||
@@ -107,7 +107,7 @@ int ecrt_slave_config_sync_manager(ec_slave_config_t *sc, uint8_t sync_index,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_slave_config_watchdog(ec_slave_config_t *sc,
|
||||
uint16_t divider, uint16_t intervals)
|
||||
@@ -127,7 +127,7 @@ void ecrt_slave_config_watchdog(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_pdo_assign_add(ec_slave_config_t *sc,
|
||||
uint8_t sync_index, uint16_t pdo_index)
|
||||
@@ -149,7 +149,7 @@ int ecrt_slave_config_pdo_assign_add(ec_slave_config_t *sc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_slave_config_pdo_assign_clear(ec_slave_config_t *sc,
|
||||
uint8_t sync_index)
|
||||
@@ -167,7 +167,7 @@ void ecrt_slave_config_pdo_assign_clear(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_pdo_mapping_add(ec_slave_config_t *sc,
|
||||
uint16_t pdo_index, uint16_t entry_index, uint8_t entry_subindex,
|
||||
@@ -192,7 +192,7 @@ int ecrt_slave_config_pdo_mapping_add(ec_slave_config_t *sc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_slave_config_pdo_mapping_clear(ec_slave_config_t *sc,
|
||||
uint16_t pdo_index)
|
||||
@@ -210,7 +210,7 @@ void ecrt_slave_config_pdo_mapping_clear(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_pdos(ec_slave_config_t *sc,
|
||||
unsigned int n_syncs, const ec_sync_info_t syncs[])
|
||||
@@ -274,7 +274,7 @@ int ecrt_slave_config_pdos(ec_slave_config_t *sc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_reg_pdo_entry(
|
||||
ec_slave_config_t *sc,
|
||||
@@ -313,7 +313,7 @@ int ecrt_slave_config_reg_pdo_entry(
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_reg_pdo_entry_pos(
|
||||
ec_slave_config_t *sc,
|
||||
@@ -354,7 +354,7 @@ int ecrt_slave_config_reg_pdo_entry_pos(
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_slave_config_dc(ec_slave_config_t *sc, uint16_t assign_activate,
|
||||
uint32_t sync0_cycle_time, int32_t sync0_shift_time,
|
||||
@@ -377,7 +377,7 @@ void ecrt_slave_config_dc(ec_slave_config_t *sc, uint16_t assign_activate,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_sdo(ec_slave_config_t *sc, uint16_t index,
|
||||
uint8_t subindex, const uint8_t *sdo_data, size_t size)
|
||||
@@ -402,7 +402,7 @@ int ecrt_slave_config_sdo(ec_slave_config_t *sc, uint16_t index,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_complete_sdo(ec_slave_config_t *sc, uint16_t index,
|
||||
const uint8_t *sdo_data, size_t size)
|
||||
@@ -427,7 +427,7 @@ int ecrt_slave_config_complete_sdo(ec_slave_config_t *sc, uint16_t index,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_sdo8(ec_slave_config_t *sc, uint16_t index,
|
||||
uint8_t subindex, uint8_t value)
|
||||
@@ -438,7 +438,7 @@ int ecrt_slave_config_sdo8(ec_slave_config_t *sc, uint16_t index,
|
||||
return ecrt_slave_config_sdo(sc, index, subindex, data, 1);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_sdo16(ec_slave_config_t *sc, uint16_t index,
|
||||
uint8_t subindex, uint16_t value)
|
||||
@@ -449,7 +449,7 @@ int ecrt_slave_config_sdo16(ec_slave_config_t *sc, uint16_t index,
|
||||
return ecrt_slave_config_sdo(sc, index, subindex, data, 2);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_sdo32(ec_slave_config_t *sc, uint16_t index,
|
||||
uint8_t subindex, uint32_t value)
|
||||
@@ -460,7 +460,7 @@ int ecrt_slave_config_sdo32(ec_slave_config_t *sc, uint16_t index,
|
||||
return ecrt_slave_config_sdo(sc, index, subindex, data, 4);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_emerg_size(ec_slave_config_t *sc, size_t elements)
|
||||
{
|
||||
@@ -480,7 +480,7 @@ int ecrt_slave_config_emerg_size(ec_slave_config_t *sc, size_t elements)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_emerg_pop(ec_slave_config_t *sc, uint8_t *target)
|
||||
{
|
||||
@@ -502,7 +502,7 @@ int ecrt_slave_config_emerg_pop(ec_slave_config_t *sc, uint8_t *target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_emerg_clear(ec_slave_config_t *sc)
|
||||
{
|
||||
@@ -521,7 +521,7 @@ int ecrt_slave_config_emerg_clear(ec_slave_config_t *sc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_emerg_overruns(ec_slave_config_t *sc)
|
||||
{
|
||||
@@ -540,7 +540,7 @@ int ecrt_slave_config_emerg_overruns(ec_slave_config_t *sc)
|
||||
return io.overruns;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_slave_config_add_sdo_request(ec_slave_config_t *sc,
|
||||
ec_sdo_request_t *req)
|
||||
@@ -556,7 +556,7 @@ void ec_slave_config_add_sdo_request(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_sdo_request_t *ecrt_slave_config_create_sdo_request(ec_slave_config_t *sc,
|
||||
uint16_t index, uint8_t subindex, size_t size)
|
||||
@@ -610,7 +610,7 @@ ec_sdo_request_t *ecrt_slave_config_create_sdo_request(ec_slave_config_t *sc,
|
||||
return req;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_slave_config_add_soe_request(ec_slave_config_t *sc,
|
||||
ec_soe_request_t *req)
|
||||
@@ -626,7 +626,7 @@ void ec_slave_config_add_soe_request(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_soe_request_t *ecrt_slave_config_create_soe_request(ec_slave_config_t *sc,
|
||||
uint8_t drive_no, uint16_t idn, size_t size)
|
||||
@@ -680,7 +680,7 @@ ec_soe_request_t *ecrt_slave_config_create_soe_request(ec_slave_config_t *sc,
|
||||
return req;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_slave_config_add_reg_request(ec_slave_config_t *sc,
|
||||
ec_reg_request_t *reg)
|
||||
@@ -696,7 +696,7 @@ void ec_slave_config_add_reg_request(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_reg_request_t *ecrt_slave_config_create_reg_request(ec_slave_config_t *sc,
|
||||
size_t size)
|
||||
@@ -745,7 +745,7 @@ ec_reg_request_t *ecrt_slave_config_create_reg_request(ec_slave_config_t *sc,
|
||||
return reg;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_slave_config_add_voe_handler(ec_slave_config_t *sc,
|
||||
ec_voe_handler_t *voe)
|
||||
@@ -761,7 +761,7 @@ void ec_slave_config_add_voe_handler(ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_voe_handler_t *ecrt_slave_config_create_voe_handler(ec_slave_config_t *sc,
|
||||
size_t size)
|
||||
@@ -811,7 +811,7 @@ ec_voe_handler_t *ecrt_slave_config_create_voe_handler(ec_slave_config_t *sc,
|
||||
return voe;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_slave_config_state(const ec_slave_config_t *sc,
|
||||
ec_slave_config_state_t *state)
|
||||
@@ -829,7 +829,7 @@ void ecrt_slave_config_state(const ec_slave_config_t *sc,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_idn(ec_slave_config_t *sc, uint8_t drive_no,
|
||||
uint16_t idn, ec_al_state_t al_state, const uint8_t *data, size_t size)
|
||||
@@ -854,7 +854,7 @@ int ecrt_slave_config_idn(ec_slave_config_t *sc, uint8_t drive_no,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ecrt_slave_config_flag(ec_slave_config_t *sc, const char *key,
|
||||
int32_t value)
|
||||
@@ -888,4 +888,4 @@ int ecrt_slave_config_flag(ec_slave_config_t *sc, const char *key,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2023 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -18,11 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_slave_config {
|
||||
ec_slave_config_t *next;
|
||||
@@ -36,8 +36,8 @@ struct ec_slave_config {
|
||||
ec_voe_handler_t *first_voe_handler;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_slave_config_clear(ec_slave_config_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+11
-17
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2023 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -18,19 +18,13 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/** \file
|
||||
* Canopen over EtherCAT SoE request functions.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -40,7 +34,7 @@
|
||||
#include "slave_config.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_soe_request_clear(ec_soe_request_t *req)
|
||||
{
|
||||
@@ -72,7 +66,7 @@ void ecrt_soe_request_idn(ec_soe_request_t *req, uint8_t drive_no,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_soe_request_timeout(ec_soe_request_t *req, uint32_t timeout)
|
||||
{
|
||||
@@ -90,21 +84,21 @@ void ecrt_soe_request_timeout(ec_soe_request_t *req, uint32_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
uint8_t *ecrt_soe_request_data(ec_soe_request_t *req)
|
||||
{
|
||||
return req->data;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
size_t ecrt_soe_request_data_size(const ec_soe_request_t *req)
|
||||
{
|
||||
return req->data_size;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_request_state_t ecrt_soe_request_state(ec_soe_request_t *req)
|
||||
{
|
||||
@@ -143,7 +137,7 @@ ec_request_state_t ecrt_soe_request_state(ec_soe_request_t *req)
|
||||
return data.state;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_soe_request_read(ec_soe_request_t *req)
|
||||
{
|
||||
@@ -160,7 +154,7 @@ void ecrt_soe_request_read(ec_soe_request_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_soe_request_write(ec_soe_request_t *req)
|
||||
{
|
||||
@@ -179,4 +173,4 @@ void ecrt_soe_request_write(ec_soe_request_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+5
-11
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2023 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -18,17 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* The license mentioned above concerns the source code only. Using the
|
||||
* EtherCAT technology and brand is only permitted in compliance with the
|
||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_soe_request {
|
||||
ec_soe_request_t *next; /**< List header. */
|
||||
@@ -41,8 +35,8 @@ struct ec_soe_request {
|
||||
size_t data_size; /**< Size of SoE data. */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_soe_request_clear(ec_soe_request_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+13
-14
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2019 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -17,14 +17,13 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* Vendor specific over EtherCAT protocol handler functions.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -35,7 +34,7 @@
|
||||
#include "slave_config.h"
|
||||
#include "master.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_voe_handler_clear(ec_voe_handler_t *voe)
|
||||
{
|
||||
@@ -45,7 +44,7 @@ void ec_voe_handler_clear(ec_voe_handler_t *voe)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_voe_handler_send_header(ec_voe_handler_t *voe, uint32_t vendor_id,
|
||||
uint16_t vendor_type)
|
||||
@@ -65,7 +64,7 @@ void ecrt_voe_handler_send_header(ec_voe_handler_t *voe, uint32_t vendor_id,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_voe_handler_received_header(const ec_voe_handler_t *voe,
|
||||
uint32_t *vendor_id, uint16_t *vendor_type)
|
||||
@@ -85,21 +84,21 @@ void ecrt_voe_handler_received_header(const ec_voe_handler_t *voe,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
uint8_t *ecrt_voe_handler_data(ec_voe_handler_t *voe)
|
||||
{
|
||||
return voe->data;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
size_t ecrt_voe_handler_data_size(const ec_voe_handler_t *voe)
|
||||
{
|
||||
return voe->data_size;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_voe_handler_read(ec_voe_handler_t *voe)
|
||||
{
|
||||
@@ -116,7 +115,7 @@ void ecrt_voe_handler_read(ec_voe_handler_t *voe)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_voe_handler_read_nosync(ec_voe_handler_t *voe)
|
||||
{
|
||||
@@ -133,7 +132,7 @@ void ecrt_voe_handler_read_nosync(ec_voe_handler_t *voe)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ecrt_voe_handler_write(ec_voe_handler_t *voe, size_t size)
|
||||
{
|
||||
@@ -152,7 +151,7 @@ void ecrt_voe_handler_write(ec_voe_handler_t *voe, size_t size)
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
ec_request_state_t ecrt_voe_handler_execute(ec_voe_handler_t *voe)
|
||||
{
|
||||
@@ -190,4 +189,4 @@ ec_request_state_t ecrt_voe_handler_execute(ec_voe_handler_t *voe)
|
||||
return data.state;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
+5
-7
@@ -1,6 +1,4 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* $Id$
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
@@ -20,11 +18,11 @@
|
||||
* along with the IgH EtherCAT master userspace library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "include/ecrt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
struct ec_voe_handler {
|
||||
ec_voe_handler_t *next;
|
||||
@@ -35,8 +33,8 @@ struct ec_voe_handler {
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
void ec_voe_handler_clear(ec_voe_handler_t *);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user