examples/CANOpenShell/CANOpenShell.h
author gabriele at naustech dot com
Thu, 12 Jun 2014 14:07:16 +0200
changeset 791 7740ac6fdedc
parent 559 8543e7edae4a
permissions -rwxr-xr-x
Fix : libcanfestival_unix.a not built if examples are not compiled

Problem: when building Canfestival with unix timers 'libcanfestiva_unix.a'
is built only if you build examples too.

Test case:

$ ./configure --timers=unix --can=socket --target=unix
$ make canfestival

...

no errors but 'libcanfestival_unix.a' is not built:
$ find . -name "*.a"
./src/libcanfestival.a

Changing line 90 of 'drivers/unix/Makefile.in' to:
#driver: $(OBJS)
driver: libcanfestival_$(TARGET).a

solves the problem:

$ ./configure --timers=unix --can=socket --target=unix
$ make canfestival

...

$ find . -name "*.a"
./drivers/unix/libcanfestival_unix.a
./src/libcanfestival.a
555
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     1
/*
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack.
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     3
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     5
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     6
See COPYING file for copyrights details.
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     7
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    12
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    16
Lesser General Public License for more details.
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    17
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    21
*/
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    22
#ifdef USE_XENO
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    23
#define eprintf(...)
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    24
#else
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    25
#define eprintf(...) printf (__VA_ARGS__)
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    26
#endif
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    27
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    28
#include "canfestival.h"
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    29
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    30
void help(void);
559
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    31
void StartNode(UNS8);
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    32
void StopNode(UNS8);
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    33
void ResetNode(UNS8);
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    34
void DiscoverNodes(void);
555
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    35
void CheckReadInfoSDO(CO_Data*, UNS8);
559
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    36
void GetSlaveNodeInfo(UNS8);
555
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    37
void CheckReadSDO(CO_Data*, UNS8);
ee24dcbd3e64 Add new example : CANOpen shell
greg
parents:
diff changeset
    38
void CheckWriteSDO(CO_Data*, UNS8);
559
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    39
void ReadDeviceEntry(char*);
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    40
void WriteDeviceEntry(char*);
8543e7edae4a Remove old entries in visual studio files
greg
parents: 555
diff changeset
    41
void SleepFunction(int);