IgH EtherCAT Master  1.6.9
sync.h
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
25
26/****************************************************************************/
27
28#ifndef __EC_SYNC_H__
29#define __EC_SYNC_H__
30
31#include "globals.h"
32#include "pdo_list.h"
33#include "sync_config.h"
34
35/****************************************************************************/
36
47
48/****************************************************************************/
49
53void ec_sync_page(const ec_sync_t *, uint8_t, uint16_t,
54 const ec_sync_config_t *, uint8_t, uint8_t *);
55int ec_sync_add_pdo(ec_sync_t *, const ec_pdo_t *);
57
58/****************************************************************************/
59
60#endif
Global definitions and macros.
struct ec_slave ec_slave_t
Definition globals.h:310
ec_direction_t
Direction type for PDO assignment functions.
Definition ecrt.h:504
EtherCAT PDO list structure.
EtherCAT PDO list.
Definition pdo_list.h:41
PDO description.
Definition pdo.h:41
Sync manager configuration.
Definition sync_config.h:38
Sync manager.
Definition sync.h:39
uint16_t physical_start_address
Physical start address.
Definition sync.h:41
uint8_t enable
Enable bit.
Definition sync.h:44
ec_slave_t * slave
Slave, the sync manager belongs to.
Definition sync.h:40
ec_pdo_list_t pdos
Current PDO assignment.
Definition sync.h:45
uint16_t default_length
Data length in bytes.
Definition sync.h:42
uint8_t control_register
Control register value.
Definition sync.h:43
void ec_sync_init(ec_sync_t *, ec_slave_t *)
Constructor.
Definition sync.c:38
void ec_sync_init_copy(ec_sync_t *, const ec_sync_t *)
Copy constructor.
Definition sync.c:55
int ec_sync_add_pdo(ec_sync_t *, const ec_pdo_t *)
Adds a PDO to the list of known mapped PDOs.
Definition sync.c:145
void ec_sync_page(const ec_sync_t *, uint8_t, uint16_t, const ec_sync_config_t *, uint8_t, uint8_t *)
Initializes a sync manager configuration page.
Definition sync.c:86
ec_direction_t ec_sync_default_direction(const ec_sync_t *)
Determines the default direction from the control register.
Definition sync.c:159
void ec_sync_clear(ec_sync_t *)
Destructor.
Definition sync.c:73
EtherCAT sync manager.