IgH EtherCAT Master  1.5.3
sync_config.c
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
6  *
7  * This file is part of the IgH EtherCAT Master.
8  *
9  * The IgH EtherCAT Master is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License version 2, as
11  * published by the Free Software Foundation.
12  *
13  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with the IgH EtherCAT Master; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  * ---
23  *
24  * The license mentioned above concerns the source code only. Using the
25  * EtherCAT technology and brand is only permitted in compliance with the
26  * industrial property and similar rights of Beckhoff Automation GmbH.
27  *
28  *****************************************************************************/
29 
34 /*****************************************************************************/
35 
36 #include "globals.h"
37 #include "sync_config.h"
38 
39 /*****************************************************************************/
40 
44  ec_sync_config_t *sync_config
45  )
46 {
47  sync_config->dir = EC_DIR_INVALID;
48  sync_config->watchdog_mode = EC_WD_DEFAULT;
49  ec_pdo_list_init(&sync_config->pdos);
50 }
51 
52 /*****************************************************************************/
53 
57  ec_sync_config_t *sync_config
58  )
59 {
60  ec_pdo_list_clear(&sync_config->pdos);
61 }
62 
63 /*****************************************************************************/
void ec_sync_config_clear(ec_sync_config_t *sync_config)
Destructor.
Definition: sync_config.c:56
void ec_pdo_list_clear(ec_pdo_list_t *pl)
PDO list destructor.
Definition: pdo_list.c:61
Global definitions and macros.
Use the default setting of the sync manager.
Definition: ecrt.h:460
ec_pdo_list_t pdos
Current PDO assignment.
Definition: sync_config.h:49
EtherCAT sync manager.
ec_direction_t dir
Sync manager direction.
Definition: sync_config.h:47
ec_watchdog_mode_t watchdog_mode
Watchdog mode.
Definition: sync_config.h:48
Invalid direction.
Definition: ecrt.h:447
Sync manager configuration.
Definition: sync_config.h:46
void ec_pdo_list_init(ec_pdo_list_t *pl)
PDO list constructor.
Definition: pdo_list.c:50
void ec_sync_config_init(ec_sync_config_t *sync_config)
Constructor.
Definition: sync_config.c:43