--- a/.hgignore Wed Dec 09 10:31:56 2009 +0100
+++ b/.hgignore Wed Dec 09 15:46:35 2009 +0100
@@ -1,1 +1,62 @@
.project
+
+syntax: regexp
+^objdictgen/gnosis$
+syntax: regexp
+\.o$
+syntax: regexp
+\.pyc$
+syntax: regexp
+\.a$
+syntax: regexp
+\.orig$
+syntax: regexp
+^\.settings.*
+syntax: regexp
+\.rej$
+syntax: regexp
+^drivers/can_socket/Makefile$
+syntax: regexp
+^drivers/timers_unix/Makefile$
+syntax: regexp
+^drivers/unix/Makefile$
+syntax: regexp
+^drivers/Makefile$
+syntax: regexp
+^examples/CANOpenShell/Debug$
+syntax: regexp
+^examples/CANOpenShell/CANOpenShellMasterOD\.c$
+syntax: regexp
+^examples/CANOpenShell/CANOpenShellMasterOD\.h$
+syntax: regexp
+^examples/CANOpenShell/CANOpenShellSlaveOD\.c$
+syntax: regexp
+^examples/CANOpenShell/CANOpenShellSlaveOD\.h$
+syntax: regexp
+^examples/CANOpenShell/Makefile$
+
+syntax: regexp
+^examples/SillySlave/Makefile$
+syntax: regexp
+^examples/TestMasterMicroMod/Makefile$
+syntax: regexp
+^examples/TestMasterSlave/Makefile$
+syntax: regexp
+^examples/TestMasterSlaveLSS/Makefile$
+syntax: regexp
+^examples/Makefile$
+syntax: regexp
+^drivers/Makefile$
+syntax: regexp
+^Makefile$
+syntax: regexp
+^objdictgen/canfestival_config\.py$
+syntax: regexp
+^objdictgen/Makefile$
+syntax: regexp
+^examples/Makefile$
+syntax: regexp
+^src/Makefile$
+
+syntax: regexp
+^include/config\.h$
\ No newline at end of file
--- a/configure Wed Dec 09 10:31:56 2009 +0100
+++ b/configure Wed Dec 09 15:46:35 2009 +0100
@@ -761,7 +761,9 @@
fi
# Target dependent Makefiles
-MAKEFILES=$MAKEFILES\ drivers/$SUB_TARGET/Makefile.in
+if [ "$SUB_TARGET" != "none" ]; then
+ MAKEFILES=$MAKEFILES\ drivers/$SUB_TARGET/Makefile.in
+fi
if [ "$SUB_TARGET" = "unix" -a "$SUB_TIMERS_DRIVER" = "kernel" ]; then
MAKEFILES=$MAKEFILES\
--- a/drivers/Makefile.in Wed Dec 09 10:31:56 2009 +0100
+++ b/drivers/Makefile.in Wed Dec 09 15:46:35 2009 +0100
@@ -36,7 +36,9 @@
ifneq ($(CAN_DRIVER),can_)
$(MAKE) -C $(CAN_DRIVER) $@
endif
- $(MAKE) -C $(TARGET) $@
+ifneq ($(TARGET),none)
+ $(MAKE) -C $(TARGET) $@
+endif
install:
@@ -47,7 +49,9 @@
ifneq ($(CAN_DRIVER),can_)
$(MAKE) -C $(CAN_DRIVER) $@
endif
- $(MAKE) -C $(TARGET) $@
+ifneq ($(TARGET),none)
+ $(MAKE) -C $(TARGET) $@
+endif
uninstall:
@@ -58,7 +62,9 @@
ifneq ($(CAN_DRIVER),can_)
$(MAKE) -C $(CAN_DRIVER) $@
endif
- $(MAKE) -C $(TARGET) $@
+ifneq ($(TARGET),none)
+ $(MAKE) -C $(TARGET) $@
+endif
clean:
@@ -69,7 +75,9 @@
ifneq ($(CAN_DRIVER),can_)
$(MAKE) -C $(CAN_DRIVER) $@
endif
- $(MAKE) -C $(TARGET) $@
+ifneq ($(TARGET),none)
+ $(MAKE) -C $(TARGET) $@
+endif
mrproper: clean
@@ -80,6 +88,8 @@
ifneq ($(CAN_DRIVER),can_)
$(MAKE) -C $(CAN_DRIVER) $@
endif
- $(MAKE) -C $(TARGET) $@
+ifneq ($(TARGET),none)
+ $(MAKE) -C $(TARGET) $@
+endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/none/applicfg.h Wed Dec 09 15:46:35 2009 +0100
@@ -0,0 +1,87 @@
+/*
+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
+*/
+
+#ifndef __APPLICFG_NONE__
+#define __APPLICFG_NONE__
+
+#include <sys/types.h>
+
+/* Define the architecture : little_endian or big_endian
+ -----------------------------------------------------
+ Test :
+ UNS32 v = 0x1234ABCD;
+ char *data = &v;
+
+ Result for a little_endian architecture :
+ data[0] = 0xCD;
+ data[1] = 0xAB;
+ data[2] = 0x34;
+ data[3] = 0x12;
+
+ Result for a big_endian architecture :
+ data[0] = 0x12;
+ data[1] = 0x34;
+ data[2] = 0xAB;
+ data[3] = 0xCD;
+ */
+
+/* Integers */
+#define INTEGER8 signed char
+#define INTEGER16 short
+#define INTEGER24 int
+#define INTEGER32 int
+#define INTEGER40 long long
+#define INTEGER48 long long
+#define INTEGER56 long long
+#define INTEGER64 long long
+
+/* Unsigned integers */
+#define UNS8 unsigned char
+#define UNS16 unsigned short
+#define UNS32 unsigned int
+#define UNS24 unsigned int
+#define UNS40 unsigned long long
+#define UNS48 unsigned long long
+#define UNS56 unsigned long long
+#define UNS64 unsigned long long
+
+/* Reals */
+#define REAL32 float
+#define REAL64 double
+
+/* Definition of error and warning macros */
+/* -------------------------------------- */
+#define MSG(...)
+
+/* Definition of MSG_ERR */
+/* --------------------- */
+#define MSG_ERR(num, str, val)
+
+/* Definition of MSG_WAR */
+/* --------------------- */
+#define MSG_WAR(num, str, val)
+
+typedef void* CAN_HANDLE;
+
+typedef void* CAN_PORT;
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/none/canfestival.h Wed Dec 09 15:46:35 2009 +0100
@@ -0,0 +1,56 @@
+#ifndef CANFESTIVAL_H_
+#define CANFESTIVAL_H_
+
+#include "timerscfg.h"
+#include "can_driver.h"
+#include "data.h"
+#include "timers_driver.h"
+
+
+/** @defgroup userapi User API */
+
+/** @defgroup can CAN management
+ * @ingroup userapi
+ */
+
+/**
+ * @brief Send a CAN message
+ * @param port CanFestival file descriptor
+ * @param *m The CAN message to send
+ * @return 0 if succes
+ */
+UNS8 canSend(CAN_PORT port, Message *m);
+
+/**
+ * @ingroup can
+ * @brief Open a CANOpen device
+ * @param *board Pointer to the board structure that contains busname and baudrate
+ * @param *d Pointer to the CAN object data structure
+ * @return
+ * - CanFestival file descriptor is returned upon success.
+ * - NULL is returned if the CANOpen board can't be opened.
+ */
+CAN_PORT canOpen(s_BOARD *board, CO_Data * d);
+
+/**
+ * @ingroup can
+ * @brief Close a CANOpen device
+ * @param *d Pointer to the CAN object data structure
+ * @return
+ * - 0 is returned upon success.
+ * - errorcode if error. (if implemented)
+ */
+int canClose(CO_Data * d);
+
+/**
+ * @ingroup can
+ * @brief Change the CANOpen device baudrate
+ * @param port CanFestival file descriptor
+ * @param *baud The new baudrate to assign
+ * @return
+ * - 0 is returned upon success or if not supported by the CAN driver.
+ * - errorcode from the CAN driver is returned if an error occurs. (if implemented in the CAN driver)
+ */
+UNS8 canChangeBaudRate(CAN_PORT port, char* baud);
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/none/timerscfg.h Wed Dec 09 15:46:35 2009 +0100
@@ -0,0 +1,35 @@
+/*
+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
+*/
+
+#ifndef __TIMERSCFG_H__
+#define __TIMERSCFG_H__
+
+/* Time unit : us */
+/* Time resolution : 64bit (~584942 years) */
+#define TIMEVAL unsigned long long
+#define TIMEVAL_MAX ~(TIMEVAL)0
+#define MS_TO_TIMEVAL(ms) ms*1000L
+#define US_TO_TIMEVAL(us) us
+
+#define TASK_HANDLE void*
+
+#endif