master/slave.h
changeset 199 04ecf40fc2e9
parent 197 b9a6e2c22745
child 238 b4960499098f
equal deleted inserted replaced
198:f7dff1ed01ba 199:04ecf40fc2e9
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
       
     3  *  s l a v e . h
       
     4  *
       
     5  *  EtherCAT stave structure.
       
     6  *
     2  *
     7  *  $Id$
     3  *  $Id$
     8  *
     4  *
     9  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
     5  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
    10  *
     6  *
    23  *  along with the IgH EtherCAT Master; if not, write to the Free Software
    19  *  along with the IgH EtherCAT Master; if not, write to the Free Software
    24  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    25  *
    21  *
    26  *****************************************************************************/
    22  *****************************************************************************/
    27 
    23 
       
    24 /**
       
    25    \file
       
    26    EtherCAT stave structure.
       
    27 */
       
    28 
       
    29 /*****************************************************************************/
       
    30 
    28 #ifndef _EC_SLAVE_H_
    31 #ifndef _EC_SLAVE_H_
    29 #define _EC_SLAVE_H_
    32 #define _EC_SLAVE_H_
    30 
    33 
    31 #include <linux/list.h>
    34 #include <linux/list.h>
    32 #include <linux/kobject.h>
    35 #include <linux/kobject.h>
    33 
    36 
    34 #include "globals.h"
    37 #include "globals.h"
    35 #include "command.h"
    38 #include "command.h"
    36 #include "types.h"
    39 #include "types.h"
    37 
       
    38 /*****************************************************************************/
       
    39 
       
    40 /**
       
    41    \defgroup Slave EtherCAT slave
       
    42    Data types and functions for EtherCAT slaves.
       
    43    \{
       
    44 */
       
    45 
    40 
    46 /*****************************************************************************/
    41 /*****************************************************************************/
    47 
    42 
    48 /**
    43 /**
    49    State of an EtherCAT slave.
    44    State of an EtherCAT slave.
   207 ec_sdo_entry_t;
   202 ec_sdo_entry_t;
   208 
   203 
   209 /*****************************************************************************/
   204 /*****************************************************************************/
   210 
   205 
   211 /**
   206 /**
   212    EtherCAT-Slave
   207    EtherCAT slave.
   213 */
   208 */
   214 
   209 
   215 struct ec_slave
   210 struct ec_slave
   216 {
   211 {
   217     struct list_head list; /**< list item */
   212     struct list_head list; /**< list item */
   267     struct list_head sdo_dictionary; /**< SDO directory list */
   262     struct list_head sdo_dictionary; /**< SDO directory list */
   268 
   263 
   269     ec_command_t mbox_command; /**< mailbox command */
   264     ec_command_t mbox_command; /**< mailbox command */
   270 };
   265 };
   271 
   266 
   272 /** \} */
       
   273 
       
   274 /*****************************************************************************/
   267 /*****************************************************************************/
   275 
   268 
   276 // slave construction/destruction
   269 // slave construction/destruction
   277 int ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t);
   270 int ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t);
   278 void ec_slave_clear(struct kobject *);
   271 void ec_slave_clear(struct kobject *);