include/none/applicfg.h
author Edouard Tisserant
Wed, 13 Apr 2011 16:29:59 +0200
changeset 659 1041153c5fd2
parent 619 96f84395154f
child 764 d7c015cb0df0
permissions -rw-r--r--
Fix some side effects of EDS import, while editing afterward
618
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     1
/*
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     3
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     5
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     6
See COPYING file for copyrights details.
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     7
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    12
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    16
Lesser General Public License for more details.
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    17
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    21
*/
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    22
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    23
#ifndef __APPLICFG_NONE__
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    24
#define __APPLICFG_NONE__
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    25
619
96f84395154f Enhancements for 'None' target : produce pre-linked object, remove some windows CRLF problems, fixed pedantic compiler warnings
edouard
parents: 618
diff changeset
    26
#include <string.h>
618
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    27
#include <sys/types.h>
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    28
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    29
/*  Define the architecture : little_endian or big_endian
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    30
 -----------------------------------------------------
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    31
 Test :
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    32
 UNS32 v = 0x1234ABCD;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    33
 char *data = &v;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    34
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    35
 Result for a little_endian architecture :
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    36
 data[0] = 0xCD;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    37
 data[1] = 0xAB;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    38
 data[2] = 0x34;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    39
 data[3] = 0x12;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    40
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    41
 Result for a big_endian architecture :
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    42
 data[0] = 0x12;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    43
 data[1] = 0x34;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    44
 data[2] = 0xAB;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    45
 data[3] = 0xCD;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    46
 */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    47
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    48
/* Integers */
619
96f84395154f Enhancements for 'None' target : produce pre-linked object, remove some windows CRLF problems, fixed pedantic compiler warnings
edouard
parents: 618
diff changeset
    49
#define INTEGER8 char
618
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    50
#define INTEGER16 short
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    51
#define INTEGER24 int
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    52
#define INTEGER32 int
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    53
#define INTEGER40 long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    54
#define INTEGER48 long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    55
#define INTEGER56 long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    56
#define INTEGER64 long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    57
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    58
/* Unsigned integers */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    59
#define UNS8   unsigned char
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    60
#define UNS16  unsigned short
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    61
#define UNS32  unsigned int
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    62
#define UNS24  unsigned int
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    63
#define UNS40  unsigned long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    64
#define UNS48  unsigned long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    65
#define UNS56  unsigned long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    66
#define UNS64  unsigned long long
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    67
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    68
/* Reals */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    69
#define REAL32	float
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    70
#define REAL64 double
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    71
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    72
/* Definition of error and warning macros */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    73
/* -------------------------------------- */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    74
#define MSG(...)
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    75
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    76
/* Definition of MSG_ERR */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    77
/* --------------------- */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    78
#define MSG_ERR(num, str, val)
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    79
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    80
/* Definition of MSG_WAR */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    81
/* --------------------- */
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    82
#define MSG_WAR(num, str, val)
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    83
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    84
typedef void* CAN_HANDLE;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    85
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    86
typedef void* CAN_PORT;
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    87
564a4a9862b1 added 'none' taget for building standalone library
edouard
parents:
diff changeset
    88
#endif