compilers compatibility
authorfrdupin
Mon, 29 Jan 2007 14:42:32 +0100
changeset 80 37354e408645
parent 79 9d8959095936
child 81 9ea761516104
compilers compatibility
examples/gene_SYNC_HCS12/appli.c
examples/gene_SYNC_HCS12/objdict.c
examples/gene_SYNC_HCS12/objdict.h
--- a/examples/gene_SYNC_HCS12/appli.c	Mon Jan 29 14:36:42 2007 +0100
+++ b/examples/gene_SYNC_HCS12/appli.c	Mon Jan 29 14:42:32 2007 +0100
@@ -240,7 +240,7 @@
     MSG_WAR(0x3F31, "CAN 1000 kbps ", 0);
     break;   
   default:
-    bi0.clk = CAN_Baudrates[CAN_BAUDRATE_1M];
+    bi0.clk = CAN_Baudrates[CAN_BAUDRATE_250K];
     MSG_WAR(0x2F32, "CAN BAUD RATE NOT DEFINED => 250 kbps ", 0);
   }
 
--- a/examples/gene_SYNC_HCS12/objdict.c	Mon Jan 29 14:36:42 2007 +0100
+++ b/examples/gene_SYNC_HCS12/objdict.c	Mon Jan 29 14:42:32 2007 +0100
@@ -1,24 +1,3 @@
-/*
-This file is part of CanFestival, a library implementing CanOpen Stack. 
-
-Copyright (C): Edouard TISSERANT and Francis DUPIN
-
-See COPYING file for copyrights details.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
 
 /* File generated by gen_cfile.py. Should not be modified. */
 
@@ -27,15 +6,15 @@
 /**************************************************************************/
 /* Declaration of the mapped variables                                    */
 /**************************************************************************/
-UNS16 acceptanceFilter1 = 0x0;		// Mapped at index 0x2015, subindex 0x00
-UNS16 acceptanceFilter2 = 0x0;		// Mapped at index 0x2016, subindex 0x00
-UNS16 acceptanceFilter3 = 0x0;		// Mapped at index 0x2017, subindex 0x00
-UNS16 acceptanceFilter4 = 0x0;		// Mapped at index 0x2018, subindex 0x00
-UNS16 mask1 = 0x0;		// Mapped at index 0x2019, subindex 0x00
-UNS16 mask2 = 0x0;		// Mapped at index 0x2020, subindex 0x00
-UNS16 mask3 = 0x0;		// Mapped at index 0x2021, subindex 0x00
-UNS16 mask4 = 0x0;		// Mapped at index 0x2022, subindex 0x00
-UNS8 applyDownloadedFilters = 0x0;		// Mapped at index 0x2023, subindex 0x00
+UNS16 acceptanceFilter1 = 0x0;		/* Mapped at index 0x2015, subindex 0x00 */
+UNS16 acceptanceFilter2 = 0x0;		/* Mapped at index 0x2016, subindex 0x00 */
+UNS16 acceptanceFilter3 = 0x0;		/* Mapped at index 0x2017, subindex 0x00 */
+UNS16 acceptanceFilter4 = 0x0;		/* Mapped at index 0x2018, subindex 0x00 */
+UNS16 mask1 = 0x0;		/* Mapped at index 0x2019, subindex 0x00 */
+UNS16 mask2 = 0x0;		/* Mapped at index 0x2020, subindex 0x00 */
+UNS16 mask3 = 0x0;		/* Mapped at index 0x2021, subindex 0x00 */
+UNS16 mask4 = 0x0;		/* Mapped at index 0x2022, subindex 0x00 */
+UNS8 applyDownloadedFilters = 0x0;		/* Mapped at index 0x2023, subindex 0x00 */
 
 /**************************************************************************/
 /* Declaration of the value range types                                   */
@@ -54,35 +33,37 @@
 /* node_id default value.*/
 UNS8 gene_SYNC_bDeviceNodeId = 0x03;
 
-//*****************************************************************************/
+/**************************************************************************/
 /* Array of message processing information */
 
 const UNS8 gene_SYNC_iam_a_slave = 1;
 
-TIMER_HANDLE gene_SYNC_heartBeatTimers[0];
-
-//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
-//
-//                       OBJECT DICTIONARY
-//                   
-//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
+TIMER_HANDLE gene_SYNC_heartBeatTimers[1];
+
+/*
+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
+
+                               OBJECT DICTIONARY
+
+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
+*/
 
 /* index 0x1000 :   Device Type. */
-                    UNS32 gene_SYNC_obj1000 = 0x0;	// 0
+                    UNS32 gene_SYNC_obj1000 = 0x0;	/* 0 */
                     subindex gene_SYNC_Index1000[] = 
                      {
                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1000 }
                      };
 
 /* index 0x1001 :   Error Register. */
-                    UNS8 gene_SYNC_obj1001 = 0x0;	// 0
+                    UNS8 gene_SYNC_obj1001 = 0x0;	/* 0 */
                     subindex gene_SYNC_Index1001[] = 
                      {
                        { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_obj1001 }
                      };
 
 /* index 0x1005 :   SYNC COB ID. */
-                    UNS32 gene_SYNC_obj1005 = 0x40000080;	// 1073741952
+                    UNS32 gene_SYNC_obj1005 = 0x40000080;	/* 1073741952 */
                     ODCallback_t gene_SYNC_Index1005_callbacks[] = 
                      {
                        NULL,
@@ -93,7 +74,7 @@
                      };
 
 /* index 0x1006 :   Communication / Cycle Period. */
-                    UNS32 gene_SYNC_obj1006 = 0x2710;	// 10000
+                    UNS32 gene_SYNC_obj1006 = 0x2710;	/* 10000 */
                     ODCallback_t gene_SYNC_Index1006_callbacks[] = 
                      {
                        NULL,
@@ -112,18 +93,18 @@
 
 /* index 0x1016 :   Consumer Heartbeat Time */
                     UNS8 gene_SYNC_highestSubIndex_obj1016 = 0;
-                    UNS32 gene_SYNC_obj1016[0];
-                    subindex gene_SYNC_Index1016[0];
+                    UNS32 gene_SYNC_obj1016[];
+                    subindex gene_SYNC_Index1016[];
 
 /* index 0x1017 :   Producer Heartbeat Time */ 
-                    UNS16 gene_SYNC_obj1017 = 0x0;   // 0
+                    UNS16 gene_SYNC_obj1017 = 0x0;   /* 0 */
 
 /* index 0x1018 :   Identity. */
-                    UNS8 gene_SYNC_highestSubIndex_obj1018 = 4; // number of subindex - 1
-                    UNS32 gene_SYNC_obj1018_Vendor_ID = 0x0;	// 0
-                    UNS32 gene_SYNC_obj1018_Product_Code = 0x0;	// 0
-                    UNS32 gene_SYNC_obj1018_Revision_Number = 0x0;	// 0
-                    UNS32 gene_SYNC_obj1018_Serial_Number = 0x0;	// 0
+                    UNS8 gene_SYNC_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/
+                    UNS32 gene_SYNC_obj1018_Vendor_ID = 0x0;	/* 0 */
+                    UNS32 gene_SYNC_obj1018_Product_Code = 0x0;	/* 0 */
+                    UNS32 gene_SYNC_obj1018_Revision_Number = 0x0;	/* 0 */
+                    UNS32 gene_SYNC_obj1018_Serial_Number = 0x0;	/* 0 */
                     subindex gene_SYNC_Index1018[] = 
                      {
                        { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1018 },
@@ -134,9 +115,9 @@
                      };
 
 /* index 0x1200 :   Server SDO Parameter. */
-                    UNS8 gene_SYNC_highestSubIndex_obj1200 = 2; // number of subindex - 1
-                    UNS32 gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x0;	// 0
-                    UNS32 gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x0;	// 0
+                    UNS8 gene_SYNC_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/
+                    UNS32 gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x0;	/* 0 */
+                    UNS32 gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x0;	/* 0 */
                     subindex gene_SYNC_Index1200[] = 
                      {
                        { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1200 },
@@ -247,27 +228,28 @@
 	return &gene_SYNC_objdict[i];
 }
 
-// To count at which received SYNC a PDO must be sent.
-// Even if no pdoTransmit are defined, at least one entry is computed
-// for compilations issues.
+/* To count at which received SYNC a PDO must be sent.
+ * Even if no pdoTransmit are defined, at least one entry is computed
+ * for compilations issues.
+ */
 UNS8 gene_SYNC_count_sync[1] = {0,};
 
 quick_index gene_SYNC_firstIndex = {
-  SDO_SVR : 6,
-  SDO_CLT : 0,
-  PDO_RCV : 0,
-  PDO_RCV_MAP : 0,
-  PDO_TRS : 0,
-  PDO_TRS_MAP : 0
+  6, /* SDO_SVR */
+  0, /* SDO_CLT */
+  0, /* PDO_RCV */
+  0, /* PDO_RCV_MAP */
+  0, /* PDO_TRS */
+  0 /* PDO_TRS_MAP */
 };
 
 quick_index gene_SYNC_lastIndex = {
-  SDO_SVR : 6,
-  SDO_CLT : 0,
-  PDO_RCV : 0,
-  PDO_RCV_MAP : 0,
-  PDO_TRS : 0,
-  PDO_TRS_MAP : 0
+  6, /* SDO_SVR */
+  0, /* SDO_CLT */
+  0, /* PDO_RCV */
+  0, /* PDO_RCV_MAP */
+  0, /* PDO_TRS */
+  0 /* PDO_TRS_MAP */
 };
 
 UNS16 gene_SYNC_ObjdictSize = sizeof(gene_SYNC_objdict)/sizeof(gene_SYNC_objdict[0]); 
--- a/examples/gene_SYNC_HCS12/objdict.h	Mon Jan 29 14:36:42 2007 +0100
+++ b/examples/gene_SYNC_HCS12/objdict.h	Mon Jan 29 14:42:32 2007 +0100
@@ -1,30 +1,13 @@
-/*
-This file is part of CanFestival, a library implementing CanOpen Stack. 
-
-Copyright (C): Edouard TISSERANT and Francis DUPIN
-
-See COPYING file for copyrights details.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
 
 /* File generated by gen_cfile.py. Should not be modified. */
 
 #include "data.h"
 
-// prototypes of function to be filled by app
+/* Prototypes of function provided by object dictionnary */
+UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, void * value);
+const indextable * gene_SYNC_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks);
+
+/* prototypes of function to be filled by app. */
 void gene_SYNC_SDOtimeoutError(UNS8 line);
 void gene_SYNC_heartbeatError(UNS8);
 
@@ -38,15 +21,15 @@
 void gene_SYNC_post_sync(void);
 void gene_SYNC_post_TPDO(void);
 
-// Master node data struct
+/* Master node data struct */
 extern CO_Data gene_SYNC_Data;
 
-extern UNS16 acceptanceFilter1;		// Mapped at index 0x2015, subindex 0x00
-extern UNS16 acceptanceFilter2;		// Mapped at index 0x2016, subindex 0x00
-extern UNS16 acceptanceFilter3;		// Mapped at index 0x2017, subindex 0x00
-extern UNS16 acceptanceFilter4;		// Mapped at index 0x2018, subindex 0x00
-extern UNS16 mask1;		// Mapped at index 0x2019, subindex 0x00
-extern UNS16 mask2;		// Mapped at index 0x2020, subindex 0x00
-extern UNS16 mask3;		// Mapped at index 0x2021, subindex 0x00
-extern UNS16 mask4;		// Mapped at index 0x2022, subindex 0x00
-extern UNS8 applyDownloadedFilters;		// Mapped at index 0x2023, subindex 0x00
+extern UNS16 acceptanceFilter1;		/* Mapped at index 0x2015, subindex 0x00*/
+extern UNS16 acceptanceFilter2;		/* Mapped at index 0x2016, subindex 0x00*/
+extern UNS16 acceptanceFilter3;		/* Mapped at index 0x2017, subindex 0x00*/
+extern UNS16 acceptanceFilter4;		/* Mapped at index 0x2018, subindex 0x00*/
+extern UNS16 mask1;		/* Mapped at index 0x2019, subindex 0x00*/
+extern UNS16 mask2;		/* Mapped at index 0x2020, subindex 0x00*/
+extern UNS16 mask3;		/* Mapped at index 0x2021, subindex 0x00*/
+extern UNS16 mask4;		/* Mapped at index 0x2022, subindex 0x00*/
+extern UNS8 applyDownloadedFilters;		/* Mapped at index 0x2023, subindex 0x00*/