IgH EtherCAT Master  1.6.2
sync_config.c
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4  *
5  * This file is part of the IgH EtherCAT Master.
6  *
7  * The IgH EtherCAT Master is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License version 2, as
9  * published by the Free Software Foundation.
10  *
11  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with the IgH EtherCAT Master; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  ****************************************************************************/
21 
26 /****************************************************************************/
27 
28 #include "globals.h"
29 #include "sync_config.h"
30 
31 /****************************************************************************/
32 
36  ec_sync_config_t *sync_config
37  )
38 {
39  sync_config->dir = EC_DIR_INVALID;
40  sync_config->watchdog_mode = EC_WD_DEFAULT;
41  ec_pdo_list_init(&sync_config->pdos);
42 }
43 
44 /****************************************************************************/
45 
49  ec_sync_config_t *sync_config
50  )
51 {
52  ec_pdo_list_clear(&sync_config->pdos);
53 }
54 
55 /****************************************************************************/
void ec_sync_config_clear(ec_sync_config_t *sync_config)
Destructor.
Definition: sync_config.c:48
void ec_pdo_list_clear(ec_pdo_list_t *pl)
PDO list destructor.
Definition: pdo_list.c:53
Global definitions and macros.
Use the default setting of the sync manager.
Definition: ecrt.h:518
ec_pdo_list_t pdos
Current PDO assignment.
Definition: sync_config.h:41
EtherCAT sync manager.
ec_direction_t dir
Sync manager direction.
Definition: sync_config.h:39
ec_watchdog_mode_t watchdog_mode
Watchdog mode.
Definition: sync_config.h:40
Invalid direction.
Definition: ecrt.h:505
Sync manager configuration.
Definition: sync_config.h:38
void ec_pdo_list_init(ec_pdo_list_t *pl)
PDO list constructor.
Definition: pdo_list.c:42
void ec_sync_config_init(ec_sync_config_t *sync_config)
Constructor.
Definition: sync_config.c:35