examples/SillySlave/main.h
changeset 400 7d845f5d730c
child 642 f77ad188c2b1
equal deleted inserted replaced
399:8d22c323fe0f 400:7d845f5d730c
       
     1 /*
       
     2 Copyright (C): Giuseppe Massimo BERTANI
       
     3 gmbertani@users.sourceforge.net
       
     4 
       
     5 
       
     6 See COPYING file for copyrights details.
       
     7 
       
     8 This library is free software; you can redistribute it and/or
       
     9 modify it under the terms of the GNU Lesser General Public
       
    10 License as published by the Free Software Foundation; either
       
    11 version 2.1 of the License, or (at your option) any later version.
       
    12 
       
    13 This library 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
       
    16 Lesser General Public License for more details.
       
    17 
       
    18 You should have received a copy of the GNU Lesser General Public
       
    19 License along with this library; if not, write to the Free Software
       
    20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    21 */
       
    22 
       
    23 /**
       
    24  * @file main.h
       
    25  * @author GMB
       
    26  * @date 17/1/08
       
    27  *
       
    28  * This file is part of SillySlave demo for CANfestival
       
    29  * open source CANopen stack.
       
    30  */ 
       
    31 
       
    32 
       
    33 
       
    34 #ifndef _MAIN_H
       
    35  #define _MAIN_H
       
    36 
       
    37 #if defined(WIN32) && !defined(__CYGWIN__)
       
    38 #include <windows.h>
       
    39 #include "getopt.h"
       
    40 void pause(void)
       
    41 {
       
    42 	system("PAUSE");
       
    43 }
       
    44 #else
       
    45 #include <unistd.h>
       
    46 #include <stdio.h>
       
    47 #include <string.h>
       
    48 #include <stdlib.h>
       
    49 #include <signal.h>
       
    50 #endif
       
    51 
       
    52 #include "canfestival.h"
       
    53 
       
    54 /*
       
    55  * Please tune the following defines to suit your needs:
       
    56  */
       
    57 #define NODE_MASTER 0x1        
       
    58 #define NODE_SLAVE  0x12        
       
    59 #define DRIVER_LIBRARY "libcanfestival_can_kvaser.so"
       
    60 #define BAUDRATE 250000
       
    61 #define BUS 0
       
    62 
       
    63 #endif /* _MAIN_H */
       
    64 
       
    65