├── .hgignore ├── .travis.yml ├── AUTHORS ├── CONTRIBUTORS ├── COPYING ├── CanFestival-3.vc10.sln ├── CanFestival-3.vc10.vcxproj ├── CanFestival-3.vc10.vcxproj.filters ├── CanFestival-3.vc9.sln ├── CanFestival-3.vc9.vcproj ├── LICENCE ├── Makefile.in ├── README.md ├── configure ├── debian ├── README.Debian ├── canfestival-devel.install ├── canfestival-examples.install ├── canfestival-objdictedit.install ├── canfestival-objdictedit.postinst ├── canfestival-objdictedit.postrm ├── canfestival-peak.install ├── canfestival-peak.postinst ├── canfestival-peak.postrm ├── canfestival-socket.install ├── canfestival-virtual.install ├── canfestival-virtual.postinst ├── canfestival-virtual.postrm ├── changelog ├── compat ├── control ├── control-peak_linux ├── control-socket ├── control-virtual ├── copyright ├── dirs ├── files ├── objdictedit.desktop ├── objdictedit.png └── rules ├── doc ├── CANOpen_memento │ ├── CANOpen_memento.odg │ └── CANOpen_memento.pdf ├── code_debug.txt ├── copcican_comedi_howto.txt ├── copcican_linux_howto.txt ├── doxygen │ ├── Doxyfile │ └── Makefile └── manual │ ├── Makefile │ └── en │ ├── Pictures │ ├── 100000000000006D000000A31EC8CB54.png │ ├── 10000000000000AA0000006014F74635.png │ ├── 10000000000000AB000000C88F594413.png │ ├── 10000000000000AC000000C9C3F53FA6.png │ ├── 10000000000000B6000000DF1EDD1E73.png │ ├── 100000000000022C000000DEDAD2140C.png │ ├── 1000000000000396000000FFC42573DA.png │ ├── 10000201000000B7000000C66AF89CD5.png │ ├── 10000201000001C4000000DD129D4661.png │ ├── 10000201000001C40000010766961D7F.png │ ├── 10000201000001FC000001E5D65E8766.png │ ├── 1000020100000258000000832C6FFAB4.png │ ├── 10000201000002DE000001D82D89C224.png │ ├── 10000201000002F30000020B23ED7F67.png │ ├── 10000201000003440000025ACC3FD2F1.png │ ├── 10000201000003CA0000016604E6A5EF.png │ ├── 10000201000003E7000001C7B0296577.png │ ├── 10000201000003F9000002CF880931E7.png │ ├── 10000201000003F9000002CF8B0CDAEA.png │ ├── new_node.png │ └── node_info.png │ ├── canfestival_OS.svg │ ├── canfestival_OSless.svg │ ├── canfestival_overview.svg │ ├── canfestival_scheduling.svg │ └── manual.tex ├── drivers ├── AT91 │ ├── can_AT91.c │ └── timer_AT91.c ├── AVR │ ├── can_AVR.c │ └── timer_AVR.c ├── Makefile.in ├── can_anagate_linux │ ├── Makefile │ ├── Makefile.in │ └── can_anagate_linux.c ├── can_anagate_win32 │ ├── Makefile.in │ ├── can_anagate_win32.c │ ├── can_anagate_win32.def │ ├── can_anagate_win32.vc10.vcxproj │ ├── can_anagate_win32.vc10.vcxproj.filters │ └── can_anagate_win32.vc9.vcproj ├── can_can4linux │ ├── Makefile.in │ ├── can4linux.h │ └── can_can4linux.c ├── can_copcican_comedi │ ├── Makefile.in │ ├── can_copcican_comedi.c │ └── co_pcicanops.h ├── can_copcican_linux │ ├── Makefile.in │ ├── can_copcican_linux.c │ └── co_pcicanops.h ├── can_copcican_win32 │ ├── ReadMe.txt │ ├── can_copcican_win32.cpp │ ├── can_copcican_win32.def │ ├── can_copcican_win32.vc10.vcxproj │ ├── can_copcican_win32.vc10.vcxproj.filters │ ├── can_copcican_win32.vcxproj.user │ ├── dllmain.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── can_ixxat_win32 │ ├── async_access_que.h │ ├── autoreleasecs.h │ ├── can_ixxat_win32.vc10.vcxproj │ ├── can_ixxat_win32.vc10.vcxproj.filters │ ├── can_ixxat_win32.vc9.vcproj │ ├── ixxat.cpp │ └── ixxat.def ├── can_kvaser │ ├── Makefile.in │ ├── README │ └── can_kvaser.c ├── can_lincan │ ├── Makefile.in │ ├── can_lincan.c │ ├── canmsg.h │ └── lincan.h ├── can_multi_peeakwin32 │ ├── can_multi_peak_win32.c │ ├── can_multi_peak_win32.def │ ├── can_multi_peak_win32.vcproj │ └── cancfg.h ├── can_peak_linux │ ├── Makefile.in │ └── can_peak_linux.c ├── can_peak_win32 │ ├── Makefile.in │ ├── can_peak_win32.c │ ├── can_peak_win32.def │ ├── can_peak_win32.vc10.vcxproj │ ├── can_peak_win32.vc10.vcxproj.filters │ ├── can_peak_win32.vc9.vcproj │ ├── cancfg.h │ ├── cancfg.h.head │ └── cancfg.h.tail ├── can_serial │ ├── Makefile.in │ ├── can_serial.c │ └── can_serial_hub.c ├── can_socket │ ├── Makefile.in │ └── can_socket.c ├── can_tcp_win32 │ ├── Makefile.in │ ├── Socket.cpp │ ├── Socket.h │ ├── can_tcp_win32.cpp │ └── can_tcp_win32_server.cpp ├── can_uvccm_win32 │ ├── can_uvccm_win32.cpp │ ├── can_uvccm_win32.def │ ├── can_uvccm_win32.vc10.vcxproj │ ├── can_uvccm_win32.vc10.vcxproj.filters │ └── can_uvccm_win32.vc9.vcproj ├── can_virtual │ ├── Makefile.in │ └── can_virtual.c ├── can_virtual_kernel │ ├── Makefile.in │ └── can_virtual_kernel.c ├── can_vscom │ ├── Makefile.in │ └── can_vscom.c ├── cm0 │ ├── Makefile.in │ ├── README │ ├── cm0.c │ ├── cm0.h │ └── stm32f0xx_conf.h ├── cm3 │ ├── Makefile.in │ ├── README │ ├── cm3.c │ ├── cm3.h │ └── stm32f10x_conf.h ├── cm4 │ ├── Makefile.in │ ├── README │ ├── cm4.c │ └── cm4.h ├── hcs12 │ ├── Makefile.in │ ├── canOpenDriver.c │ ├── interrupt.c │ ├── ports.s │ └── ports.txt ├── timers_kernel │ ├── Makefile.in │ └── timers_kernel.c ├── timers_kernel_xeno │ ├── Makefile.in │ └── timers_kernel_xeno.c ├── timers_rtai │ ├── Makefile.in │ └── timers_rtai.c ├── timers_unix │ ├── Makefile.in │ └── timers_unix.c ├── timers_win32 │ ├── Makefile.in │ └── timers_win32.c ├── timers_xeno │ ├── Makefile.in │ └── timers_xeno.c ├── unix │ ├── Makefile.in │ └── unix.c └── win32 │ ├── Makefile.in │ └── win32.c ├── examples ├── AT91 │ └── Master │ │ ├── AT91SAM7X-EK.h │ │ ├── Makefile │ │ ├── ObjDict.c │ │ ├── ObjDict.h │ │ ├── ObjDict.od │ │ ├── interrupt_timer.c │ │ ├── io_macro.h │ │ └── main.c ├── AVR │ └── Slave │ │ ├── AVR-Studio │ │ ├── SlaveAVR.aps │ │ ├── default │ │ │ └── Makefile │ │ └── slaveavr.aws │ │ ├── Atmel-Studio │ │ ├── SlaveAVR.atsln │ │ ├── SlaveAVR.componentinfo.xml │ │ └── SlaveAVR.cproj │ │ ├── Makefile │ │ ├── ObjDict.c │ │ ├── ObjDict.h │ │ ├── ObjDict.od │ │ ├── config.h │ │ ├── ds401.c │ │ ├── ds401.h │ │ ├── hardware.h │ │ └── main.c ├── CANOpenShell │ ├── CANOpenShell.c │ ├── CANOpenShell.h │ ├── CANOpenShell.vc10.vcxproj │ ├── CANOpenShell.vc10.vcxproj.filters │ ├── CANOpenShell.vc9.vcproj │ ├── CANOpenShellMasterOD.od │ ├── CANOpenShellSlaveOD.od │ ├── CANOpenShellsln │ └── Makefile.in ├── DS401_Master │ ├── Makefile.in │ ├── TestMaster.h │ ├── TestMaster.od │ ├── TestMasterMicroMod.c │ ├── TestMasterMicroMod.h │ ├── TestMasterMicroMod.vc10.vcxproj │ ├── TestMasterMicroMod.vc10.vcxproj.filters │ ├── TestMasterMicroMod.vc9.vcproj │ ├── getopt.c │ └── getopt.h ├── DS401_Slave_Gui │ ├── CallBack.cpp │ ├── CallBack.h │ ├── DS401_Slave_Gui.eds │ ├── Makefile.in │ ├── ObjDict.h │ ├── ObjDict.od │ ├── TestSlaveGui.cpp │ ├── TestSlaveGui.h │ ├── getopt.c │ ├── getopt.h │ ├── main.cpp │ └── main.h ├── Makefile.in ├── SillySlave │ ├── EDS2CSV.py │ ├── Makefile.in │ ├── README │ ├── SillySlave.c │ ├── SillySlave.h │ ├── SillySlave.od │ ├── main.c │ ├── main.h │ ├── slave.c │ └── slave.h ├── TestMasterMicroMod │ ├── Makefile.in │ ├── TestMaster.h │ ├── TestMaster.od │ ├── TestMasterMicroMod.c │ ├── TestMasterMicroMod.h │ ├── TestMasterMicroMod.vc9.vcproj │ ├── getopt.c │ └── getopt.h ├── TestMasterSlave │ ├── Makefile.in │ ├── Master.c │ ├── Master.h │ ├── Slave.c │ ├── Slave.h │ ├── TestMaster.h │ ├── TestMaster.od │ ├── TestMasterSlave.c │ ├── TestMasterSlave.h │ ├── TestMasterSlave.vc9.vcproj │ ├── TestSlave.h │ ├── TestSlave.od │ ├── getopt.c │ └── getopt.h ├── TestMasterSlaveLSS │ ├── Makefile.in │ ├── Master.c │ ├── Master.h │ ├── SlaveA.c │ ├── SlaveA.h │ ├── SlaveB.c │ ├── SlaveB.h │ ├── TestMaster.od │ ├── TestMasterSlaveLSS.c │ ├── TestMasterSlaveLSS.h │ ├── TestMasterSlaveLSS.vc9.vcproj │ ├── TestSlaveA.od │ ├── TestSlaveB.od │ ├── getopt.c │ └── getopt.h ├── gene_SYNC_HCS12 │ ├── Makefile.in │ ├── appli.c │ ├── objdict.c │ ├── objdict.h │ ├── objdict.od │ ├── readme.txt │ ├── trace32_flash_debug.cmm │ ├── trace32_flash_debug_sans_init.cmm │ ├── trace32_flash_programmer.cmm │ └── vectors.s ├── kerneltest │ ├── Makefile.in │ ├── Master.c │ ├── Master.h │ ├── Slave.c │ ├── Slave.h │ ├── TestMaster.c │ ├── TestMaster.h │ ├── TestMaster.od │ ├── TestMasterSlave.c │ ├── TestMasterSlave.h │ ├── TestSlave.c │ ├── TestSlave.h │ ├── TestSlave.od │ ├── console │ │ ├── console.c │ │ └── console.h │ ├── insert.sh │ ├── kernel_module.c │ ├── remove.sh │ └── run.sh ├── linux │ └── dcf │ │ ├── Makefile.in │ │ ├── README │ │ ├── dcfdata.txt │ │ ├── gendcf.c │ │ ├── gendcf.h │ │ ├── master.c │ │ ├── masterdic.c │ │ ├── masterdic.h │ │ ├── masterdic.od │ │ ├── slave.c │ │ ├── slavedic.c │ │ ├── slavedic.h │ │ └── slavedic.od ├── test_copcican_comedi │ ├── Makefile.in │ ├── insert.sh │ └── test_copcican_comedi.c ├── test_copcican_linux │ ├── Makefile.in │ └── test_copcican_linux.c └── win32test │ ├── main.c │ ├── win32test.c │ ├── win32test.h │ ├── win32test.od │ ├── win32test.vc10.vcxproj │ ├── win32test.vc10.vcxproj.filters │ └── win32test.vc9.vcproj ├── include ├── AT91 │ ├── Atmel │ │ └── lib_AT91SAM7X256.h │ ├── applicfg.h │ ├── can_AT91.h │ ├── canfestival.h │ ├── config.h │ ├── iar.h │ └── timerscfg.h ├── AVR │ ├── applicfg.h │ ├── can_AVR.h │ ├── can_drv.h │ ├── canfestival.h │ ├── config.h │ ├── iar.h │ └── timerscfg.h ├── can.h ├── can_driver.h ├── cm0 ├── cm3 ├── cm4 │ ├── applicfg.h │ ├── canfestival.h │ └── timerscfg.h ├── data.h ├── dcf.h ├── def.h ├── emcy.h ├── hcs12 │ ├── applicfg.h │ ├── asm-m68hc12 │ │ ├── ports.h │ │ ├── ports_def.h │ │ ├── portsaccess.h │ │ └── regs.h │ ├── board │ │ ├── alire.txt │ │ └── arch │ │ │ ├── exit.h │ │ │ ├── interrupts.h │ │ │ ├── memory.x │ │ │ └── param.h │ ├── canOpenDriver.h │ ├── candriver.h │ ├── error.h │ ├── interrupt.h │ └── regbase.h ├── lifegrd.h ├── lss.h ├── nmtMaster.h ├── nmtSlave.h ├── none │ ├── applicfg.h │ ├── canfestival.h │ └── timerscfg.h ├── objacces.h ├── objdictdef.h ├── pdo.h ├── sdo.h ├── states.h ├── sync.h ├── sysdep.h ├── timer.h ├── timers_driver.h ├── timers_kernel │ └── timerscfg.h ├── timers_kernel_xeno │ └── timerscfg.h ├── timers_rtai │ └── timerscfg.h ├── timers_unix │ └── timerscfg.h ├── timers_xeno │ └── timerscfg.h ├── unix │ ├── applicfg.h │ └── canfestival.h └── win32 │ ├── applicfg.h │ ├── canfestival.h │ ├── config.h │ └── timerscfg.h ├── objdictgen ├── Gnosis_Utils-current.tar.gz ├── Makefile.in ├── canfestival_config.py.in ├── commondialogs.py ├── config │ ├── DS-302.prf │ ├── DS-401.prf │ ├── DS-402.prf │ ├── DS-404.prf │ ├── DS-406.prf │ ├── DS-408.prf │ ├── DS-410.prf │ ├── DS-418.prf │ └── DS-419.prf ├── doc │ ├── 301_v04000201.pdf │ ├── about.html │ ├── canfestival.gif │ └── manual_en.pdf ├── doc_index │ ├── DS301_index.py │ └── __init__.py ├── eds_utils.py ├── examples │ ├── example_objdict.c │ ├── example_objdict.h │ └── example_objdict.od ├── gen_cfile.py ├── i18n │ ├── README │ ├── app.fil │ ├── messages.pot │ ├── mki18n.py │ ├── objdictgen_fr_FR.po │ └── objdictgen_zh_CN.po ├── locale │ ├── fr_FR │ │ └── LC_MESSAGES │ │ │ └── objdictgen.mo │ └── zh_CN │ │ └── LC_MESSAGES │ │ └── objdictgen.mo ├── networkedit.ico ├── networkedit.png ├── networkedit.py ├── networkeditortemplate.py ├── node.py ├── nodeeditortemplate.py ├── nodelist.py ├── nodemanager.py ├── objdictedit.py ├── objdictgen.py └── subindextable.py └── src ├── Makefile.in ├── dcf.c ├── emcy.c ├── lifegrd.c ├── lss.c ├── nmtMaster.c ├── nmtSlave.c ├── objacces.c ├── pdo.c ├── sdo.c ├── states.c ├── symbols.c ├── sync.c ├── timer.c └── win32 └── CanFestival-3.def /.travis.yml: -------------------------------------------------------------------------------- 1 | language: "c" 2 | install: "echo" 3 | 4 | before_script: 5 | - sudo apt-get install libxenomai-dev 6 | # - sudo apt-get install gcc-avr binutils-avr avr-libc 7 | 8 | script: "./configure --can=\"$CAN_DRIVER\" --timers=\"$TIMERS\" && make" 9 | branches: 10 | only: 11 | - master 12 | notifications: 13 | recipients: 14 | - hacking@taedcke.com 15 | email: 16 | on_success: change 17 | on_failure: always 18 | irc: "irc.freenode.org#canfestival" 19 | 20 | env: 21 | - CAN_DRIVER="virtual" TIMERS="unix" 22 | - CAN_DRIVER="vscom" TIMERS="unix" 23 | - CAN_DRIVER="can4linux" TIMERS="unix" 24 | - CAN_DRIVER="lincan" TIMERS="unix" 25 | - CAN_DRIVER="socket" TIMERS="unix" 26 | - CAN_DRIVER="virtual" TIMERS="xeno" 27 | - CAN_DRIVER="socket" TIMERS="xeno" 28 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | Authors : 3 | ========= 4 | 5 | Edouard TISSERANT (www.canfestival.org) 6 | Francis DUPIN (LIVIC) 7 | Laurent BESSARD (www.canfestival.org) 8 | 9 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/CONTRIBUTORS -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | CanFestival Master/slave CANopen Library 2 | 3 | Copyright (C): Francis DUPIN (LIVIC), Edouard TISSERANT and Laurent BESSARD 4 | 5 | LIVIC : Laboratoire Interractions V�hicule Infrastructure Conducteur 6 | INRETS/LIVIC (http://www.inrets.fr) 7 | Institut National de Recherche sur les Transports et leur S�curit� 8 | LCPC Laboratoire Central des Ponts et Chauss�es 9 | 10 | 11 | This work is based on 12 | - CanOpenMatic by Edouard TISSERANT 13 | http://sourceforge.net/projects/canfestival/ 14 | - slavelib by Raphael Zulliger 15 | http://sourceforge.net/projects/canopen/ 16 | 17 | This library is free software; you can redistribute it and/or 18 | modify it under the terms of the GNU Lesser General Public 19 | License as published by the Free Software Foundation; either 20 | version 2.1 of the License, or (at your option) any later version. 21 | 22 | This library is distributed in the hope that it will be useful, 23 | but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 | Lesser General Public License for more details. 26 | 27 | You should have received a copy of the GNU Lesser General Public 28 | License along with this library; if not, write to the Free Software 29 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 30 | 31 | See LICENCE file for LGPL details. 32 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | all: objdictedit canfestival examples 25 | 26 | examples: canfestival driver 27 | $(MAKE) -C examples all 28 | 29 | documentation: 30 | $(MAKE) -C doc/doxygen 31 | 32 | manual: 33 | $(MAKE) -C doc/manual 34 | 35 | objdictedit: 36 | $(MAKE) -C objdictgen all 37 | 38 | canfestival: driver 39 | $(MAKE) -C src $@ 40 | 41 | driver: 42 | $(MAKE) -C drivers $@ 43 | 44 | install: canfestival driver 45 | $(MAKE) -C drivers $@ 46 | $(MAKE) -C src $@ 47 | $(MAKE) -C examples $@ 48 | $(MAKE) -C objdictgen $@ 49 | ldconfig 50 | 51 | uninstall: 52 | $(MAKE) -C drivers $@ 53 | $(MAKE) -C src $@ 54 | $(MAKE) -C examples $@ 55 | $(MAKE) -C objdictgen $@ 56 | 57 | clean: 58 | $(MAKE) -C src $@ 59 | $(MAKE) -C drivers $@ 60 | $(MAKE) -C examples $@ 61 | $(MAKE) -C objdictgen $@ 62 | 63 | mrproper: clean 64 | $(MAKE) -C src $@ 65 | $(MAKE) -C drivers $@ 66 | $(MAKE) -C examples $@ 67 | $(MAKE) -C objdictgen $@ 68 | 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a fork of the CanFestival-3 project http://dev.automforge.net/CanFestival-3 2 | 3 | Latest work done: 4 | 5 | - Fix some big endian issues and remove compiler warnings by adding explicit casts. Thanks to Casey Klimasuskas for sharing. 6 | 7 | - The Canopen dictionary editor Objdictedit.py now allows to define the size of each string or domain, thanks to Mattes Standfuß for his work 8 | 9 | - The stack can now be compiled as a .so shared lib, thanks to Mattes Standfuß for this also 10 | 11 | - New example added : examples/linux/dcf 12 | 13 | - I needed the stack to be more dynamic, i wanted to be able to dynamically build the OD and the CO_Data struct without any global declaration, so i have made few changes. (this is not a dirty hack it is even cleaner i think) 14 | 15 | - solving array of string or domain issue (search for "Array of strings issue" in the mailing list) 16 | 17 | - solving bugs on sdo block transfer and dcf management 18 | 19 | - stm32F0/F1/F4 basic support 20 | 21 | Any feedback, comment, is welcome. 22 | 23 | You can contact me at : 24 | fbeaulier < a t > ingelibre < d o t > fr -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | canfestival for Debian 2 | ---------------------- 3 | 4 | 5 | 6 | -- edouard Fri, 16 Nov 2007 11:22:17 +0100 7 | -------------------------------------------------------------------------------- /debian/canfestival-devel.install: -------------------------------------------------------------------------------- 1 | usr/include/canfestival/* 2 | usr/lib/libcanfestival.a 3 | usr/lib/libcanfestival_unix.a 4 | usr/share/CanFestival-3/src/* 5 | usr/share/CanFestival-3/include/* 6 | usr/share/CanFestival-3/drivers/* -------------------------------------------------------------------------------- /debian/canfestival-examples.install: -------------------------------------------------------------------------------- 1 | usr/bin/CANOpenShell 2 | usr/bin/TestMasterSlave 3 | #usr/bin/TestMasterMicroMod 4 | #usr/bin/DS401_Slave_Gui 5 | #usr/bin/DS401_Master 6 | -------------------------------------------------------------------------------- /debian/canfestival-objdictedit.install: -------------------------------------------------------------------------------- 1 | usr/share/CanFestival-3/objdictgen/* 2 | usr/share/applications/objdictedit.desktop -------------------------------------------------------------------------------- /debian/canfestival-objdictedit.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for canfestival 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | ln -sf /usr/share/CanFestival-3/objdictgen/objdictedit.py /usr/bin/objdictedit 24 | ln -sf /usr/share/objdictgen/objdictedit.py /usr/bin/objdictgen 25 | ;; 26 | 27 | abort-upgrade|abort-remove|abort-deconfigure) 28 | ;; 29 | 30 | *) 31 | echo "postinst called with unknown argument \`$1'" >&2 32 | exit 1 33 | ;; 34 | esac 35 | 36 | # dh_installdeb will replace this with shell code automatically 37 | # generated by other debhelper scripts. 38 | 39 | #DEBHELPER# 40 | 41 | exit 0 42 | 43 | 44 | -------------------------------------------------------------------------------- /debian/canfestival-objdictedit.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for canfestival-objdictedit 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | OBJDICTEDIT=/usr/bin/objdictedit 9 | OBJDICTGEN=/usr/bin/objdictgen 10 | 11 | case "$1" in 12 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 13 | 14 | if [ -f "$OBJDICTEDIT" ]; then 15 | rm $OBJDICTEDIT 16 | fi 17 | 18 | if [ -f "$OBJDICTGEN" ]; then 19 | rm $OBJDICTGEN 20 | fi 21 | ;; 22 | 23 | *) 24 | echo "postrm called with unknown argument \`$1'" >&2 25 | exit 1 26 | ;; 27 | esac 28 | 29 | # dh_installdeb will replace this with shell code automatically 30 | # generated by other debhelper scripts. 31 | 32 | #DEBHELPER# 33 | 34 | exit 0 35 | 36 | 37 | -------------------------------------------------------------------------------- /debian/canfestival-peak.install: -------------------------------------------------------------------------------- 1 | usr/lib/libcanfestival_can_peak_linux.so 2 | -------------------------------------------------------------------------------- /debian/canfestival-peak.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for canfestival 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | DLL_LIST= 9 | CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py 10 | CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py 11 | 12 | case "$1" in 13 | configure) 14 | ldconfig 15 | 16 | # Find canfestival driver library in /usr/lib 17 | cd /usr/lib 18 | for file in libcanfestival_can* 19 | do 20 | DLL_LIST="'$file',""$DLL_LIST" 21 | done 22 | 23 | # copy template config and add the DLL_LIST 24 | # do this to display available canfestival plugin list choice in beremiz 25 | cat $CF_CONFIG_TEMP > $CF_CONFIG 26 | echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG 27 | ;; 28 | 29 | abort-upgrade|abort-remove|abort-deconfigure) 30 | ;; 31 | 32 | *) 33 | echo "postinst called with unknown argument \`$1'" >&2 34 | exit 1 35 | ;; 36 | esac 37 | 38 | # dh_installdeb will replace this with shell code automatically 39 | # generated by other debhelper scripts. 40 | 41 | #DEBHELPER# 42 | 43 | exit 0 44 | 45 | 46 | -------------------------------------------------------------------------------- /debian/canfestival-peak.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for canfestival 3 | 4 | set -e 5 | 6 | DLL_LIST= 7 | CF_CONFIG_DIR=/usr/share/CanFestival-3/objdictgen/ 8 | CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py 9 | CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py 10 | 11 | case "$1" in 12 | configure) 13 | ;; 14 | 15 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 16 | 17 | if [ -d $CF_CONFIG_DIR ];then 18 | ldconfig 19 | # Find canfestival driver library in /usr/lib 20 | cd /usr/lib 21 | for file in `ls libcanfestival_can* 2>/dev/null` 22 | do 23 | DLL_LIST="'$file',""$DLL_LIST" 24 | done 25 | 26 | # copy template config and add the DLL_LIST 27 | # do this to display available canfestival plugin list choice in beremiz 28 | cat $CF_CONFIG_TEMP > $CF_CONFIG 29 | echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG 30 | fi 31 | ;; 32 | 33 | *) 34 | echo "postrm called with unknown argument \`$1'" >&2 35 | exit 1 36 | ;; 37 | esac 38 | 39 | # dh_installdeb will replace this with shell code automatically 40 | # generated by other debhelper scripts. 41 | 42 | #DEBHELPER# 43 | 44 | exit 0 45 | 46 | 47 | -------------------------------------------------------------------------------- /debian/canfestival-socket.install: -------------------------------------------------------------------------------- 1 | usr/lib/libcanfestival_can_socket.so 2 | -------------------------------------------------------------------------------- /debian/canfestival-virtual.install: -------------------------------------------------------------------------------- 1 | usr/lib/libcanfestival_can_virtual.so 2 | -------------------------------------------------------------------------------- /debian/canfestival-virtual.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for canfestival 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | DLL_LIST= 9 | CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py 10 | CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py 11 | 12 | case "$1" in 13 | configure) 14 | ldconfig 15 | 16 | # Find canfestival driver library in /usr/lib 17 | cd /usr/lib 18 | for file in libcanfestival_can* 19 | do 20 | DLL_LIST="'$file',""$DLL_LIST" 21 | done 22 | 23 | # copy template config and add the DLL_LIST 24 | # do this to display available canfestival plugin list choice in beremiz 25 | cat $CF_CONFIG_TEMP > $CF_CONFIG 26 | echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG 27 | ;; 28 | 29 | abort-upgrade|abort-remove|abort-deconfigure) 30 | ;; 31 | 32 | *) 33 | echo "postinst called with unknown argument \`$1'" >&2 34 | exit 1 35 | ;; 36 | esac 37 | 38 | # dh_installdeb will replace this with shell code automatically 39 | # generated by other debhelper scripts. 40 | 41 | #DEBHELPER# 42 | 43 | exit 0 44 | 45 | 46 | -------------------------------------------------------------------------------- /debian/canfestival-virtual.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for canfestival 3 | 4 | set -e 5 | 6 | DLL_LIST= 7 | CF_CONFIG_DIR=/usr/share/CanFestival-3/objdictgen/ 8 | CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py 9 | CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py 10 | 11 | case "$1" in 12 | configure) 13 | ;; 14 | 15 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 16 | 17 | if [ -d $CF_CONFIG_DIR ];then 18 | ldconfig 19 | # Find canfestival driver library in /usr/lib 20 | cd /usr/lib 21 | for file in `ls libcanfestival_can* 2>/dev/null` 22 | do 23 | DLL_LIST="'$file',""$DLL_LIST" 24 | done 25 | 26 | # copy template config and add the DLL_LIST 27 | # do this to display available canfestival plugin list choice in beremiz 28 | cat $CF_CONFIG_TEMP > $CF_CONFIG 29 | echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG 30 | fi 31 | ;; 32 | 33 | *) 34 | echo "postrm called with unknown argument \`$1'" >&2 35 | exit 1 36 | ;; 37 | esac 38 | 39 | # dh_installdeb will replace this with shell code automatically 40 | # generated by other debhelper scripts. 41 | 42 | #DEBHELPER# 43 | 44 | exit 0 45 | 46 | 47 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | canfestival (3.0-%DATEVERSION%) unstable; urgency=low 2 | 3 | * Initial release (Closes: #nnnn) 4 | 5 | -- edouard Fri, 16 Nov 2007 11:22:17 +0100 6 | 7 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: canfestival 2 | Section: devel 3 | Priority: standard 4 | Maintainer: edouard 5 | Build-Depends: debhelper (>= 5) 6 | Standards-Version: 3.7.2 7 | 8 | Package: canfestival 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends} 11 | Description: 12 | 13 | Package: canfestival-devel 14 | Architecture: all 15 | Description: Canfestival library 16 | This package contains the CanFestival library for unix platform. 17 | 18 | Package: canfestival-examples 19 | Architecture: all 20 | Description: Program's Examples for canfestival 21 | This package contains some test programs you can use as example 22 | for your own developments. 23 | - TestMasterSlave : Two CanOpen nodes in the same process 24 | - TestMasterMicromod : A CanOpen master that control a peak MicroMod module 25 | - DS401_Master : Master Node for the DS401_Slave_Gui 26 | - DS401_Slave_Gui : Simulate an I/O module with GUI 27 | 28 | Package: canfestival-doc 29 | Architecture: all 30 | Description: Documentation for canfestival 31 | 32 | Package: canfestival-${CAN_INTERFACE} 33 | Architecture: all 34 | Description: Can Driver Interface for Peak Driver 35 | 36 | Package: canfestival-objdictedit 37 | Architecture: all 38 | Depends: python-wxgtk2.8, xpdf 39 | Description: A CanOpen Node Editor 40 | Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to 41 | create the C file needed to create a new CanOpen node. 42 | 43 | -------------------------------------------------------------------------------- /debian/control-peak_linux: -------------------------------------------------------------------------------- 1 | Source: canfestival 2 | Section: devel 3 | Priority: standard 4 | Maintainer: edouard 5 | Build-Depends: debhelper (>= 5), peak-linux-driver-modules 6 | Standards-Version: 3.7.2 7 | 8 | Package: canfestival-peak 9 | Architecture: all 10 | Depends: canfestival-devel, canfestival-objdictedit 11 | Description: Can Driver Interface for Peak Driver 12 | -------------------------------------------------------------------------------- /debian/control-socket: -------------------------------------------------------------------------------- 1 | Source: canfestival 2 | Section: devel 3 | Priority: standard 4 | Maintainer: edouard 5 | Build-Depends: debhelper (>= 5), libwxgtk2.8-dev 6 | Standards-Version: 3.7.2 7 | 8 | Package: canfestival 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends} 11 | Description: 12 | 13 | Package: canfestival-devel 14 | Architecture: all 15 | Description: Canfestival library 16 | This package contains the CanFestival library for unix platform. 17 | 18 | Package: canfestival-examples 19 | Architecture: all 20 | Description: Program's Examples for canfestival 21 | This package contains some test programs you can use as example 22 | for your own developments. 23 | - TestMasterSlave : Two CanOpen nodes in the same process 24 | - TestMasterMicromod : A CanOpen master that control a peak MicroMod module 25 | - DS401_Master : Master Node for the DS401_Slave_Gui 26 | - DS401_Slave_Gui : Simulate an I/O module with GUI 27 | 28 | Package: canfestival-doc 29 | Architecture: all 30 | Description: Documentation for canfestival 31 | 32 | Package: canfestival-socket 33 | Architecture: all 34 | Description: Can interface for Socket-CAN 35 | 36 | Package: canfestival-objdictedit 37 | Architecture: all 38 | Depends: python-wxgtk2.8, xpdf 39 | Description: A CanOpen Node Editor 40 | Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to 41 | create the C file needed to create a new CanOpen node. 42 | 43 | -------------------------------------------------------------------------------- /debian/control-virtual: -------------------------------------------------------------------------------- 1 | Source: canfestival 2 | Section: devel 3 | Priority: standard 4 | Maintainer: edouard 5 | Build-Depends: debhelper (>= 5) 6 | Standards-Version: 3.7.2 7 | 8 | Package: canfestival-devel 9 | Architecture: all 10 | Description: Canfestival library 11 | This package contains the CanFestival library for unix platform. 12 | 13 | Package: canfestival-examples 14 | Architecture: all 15 | Description: Program's Examples for canfestival 16 | This package contains some test programs you can use as example 17 | for your own developments. 18 | - TestMasterSlave : Two CanOpen nodes in the same process 19 | - CANOpenShell : A CanOpen node that can execute some user commands through stdin 20 | 21 | Package: canfestival-virtual 22 | Architecture: all 23 | Depends: canfestival-devel, canfestival-objdictedit 24 | Description: Virtual Can Interfaces 25 | 26 | Package: canfestival-objdictedit 27 | Architecture: all 28 | Depends: python-wxgtk2.8 29 | Description: A CanOpen Node Editor 30 | Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to 31 | create the C file needed to create a new CanOpen node. 32 | 33 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by edouard on 2 | Thu, 22 Nov 2007 09:23:34 +0100. 3 | 4 | It was downloaded from : http://www.canfestival.org 5 | 6 | Upstream Author: Edouard Tisserant 7 | 8 | License: 9 | 10 | This package is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2 of the License, or (at your option) any later version. 14 | 15 | This package is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | Lesser General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public 21 | License along with this package; if not, write to the Free Software 22 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 | 24 | On Debian systems, the complete text of the GNU Lesser General 25 | Public License can be found in `/usr/share/common-licenses/LGPL'. 26 | 27 | 28 | The Debian packaging is (C) 2007, edouard and 29 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 30 | 31 | -------------------------------------------------------------------------------- /debian/dirs: -------------------------------------------------------------------------------- 1 | /usr/share/applications 2 | -------------------------------------------------------------------------------- /debian/files: -------------------------------------------------------------------------------- 1 | canfestival_3-1_i386.deb devel standard 2 | canfestival-devel_3-1_all.deb devel standard 3 | canfestival-examples_3-1_all.deb devel standard 4 | canfestival-doc_3-1_all.deb devel standard 5 | canfestival-peak_3-1_all.deb devel standard 6 | canfestival-objdictedit_3-1_all.deb devel standard 7 | -------------------------------------------------------------------------------- /debian/objdictedit.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=CANOpen Object Dictionary Editor 4 | Name[fr]=Editeur de Dictionnaire d'Objets CANOpen 5 | Comment=Create, modifify, configure CANOpen nodes 6 | Comment[fr]=Créer, modifier, configurer des noeuds CANOpen 7 | Exec=/usr/bin/objdictedit 8 | Icon=/usr/share/CanFestival-3/objdictgen/networkedit.png 9 | Terminal=false 10 | MultipleArgs=false 11 | Type=Application 12 | Categories=Application;Development; 13 | StartupNotify=true 14 | 15 | -------------------------------------------------------------------------------- /debian/objdictedit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/debian/objdictedit.png -------------------------------------------------------------------------------- /doc/CANOpen_memento/CANOpen_memento.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/CANOpen_memento/CANOpen_memento.odg -------------------------------------------------------------------------------- /doc/CANOpen_memento/CANOpen_memento.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/CANOpen_memento/CANOpen_memento.pdf -------------------------------------------------------------------------------- /doc/code_debug.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/code_debug.txt -------------------------------------------------------------------------------- /doc/copcican_comedi_howto.txt: -------------------------------------------------------------------------------- 1 | HOW TO configure CanFestival for a CO-PCICAN card for COMEDI in the kernel (optionally with Xenomai): 2 | 3 | 4 | 5 | pre-actions: 6 | - install the CO-PCICAN card 7 | - install and load COMEDI and the corresponding driver co_pcican.ko 8 | (COMEDI sources are expected in /usr/src/comedi) 9 | 10 | - optionally: install the Xenomai package 11 | (Xenomai sources are expected in /usr/xenomai) 12 | 13 | 14 | 15 | - unpack the package to your target (if not already done) 16 | 17 | - perform package configuration: 18 | sh ./configure --can=copcican_comedi --timers=kernel --kerneldir='/lib/modules/$(shell uname -r)/build' 19 | 20 | optionally: use --timers=kernel_xeno for the realtime Xenomai timer functions 21 | 22 | - patch the sed "s:-I:-I$(src)/:g" statement to 23 | 's:-I../..:-I/canopeninstalldir:g' in drivers/unix/Makefile 24 | 's:-I..:-I/canopeninstalldir:g' in src/Makefile 25 | The original statement did not run on my computer ! 26 | 27 | - build the CanFestival Unix library: 28 | cd drivers/unix 29 | make 30 | 31 | - build the CanFestival library: 32 | cd src 33 | make 34 | make install 35 | 36 | - build the CO-PCICAN driver interface: 37 | cd drivers/can_copcican_comedi 38 | make 39 | make install 40 | 41 | - build the example application (not for Xenomai): 42 | cd examples/test_copcican_comedi 43 | make 44 | make install 45 | 46 | Run test_copcican_comedi with the insert.sh script to see it works... 47 | 48 | For Xenomai please use the example /usr/src/scale-rt-canopendemo of the SCALE-RT distribution. 49 | 50 | 51 | 52 | Copyright (C) 2010 Cosateq GmbH & Co.KG 53 | http://www.cosateq.com/ 54 | http://www.scale-rt.com/ 55 | 56 | -------------------------------------------------------------------------------- /doc/copcican_linux_howto.txt: -------------------------------------------------------------------------------- 1 | HOW TO configure CanFestival for a CO-PCICAN card for linux: 2 | 3 | 4 | 5 | pre-actions: 6 | - install the CO-PCICAN card 7 | - install and load the user space driver co_pcicanext.ko 8 | 9 | 10 | 11 | - unpack the package to your target (if not already done) 12 | 13 | - create empty file: 14 | touch /usr/local/lib/libcanfestival_can_copcican_linux.so 15 | 16 | - perform package configuration: 17 | sh ./configure --can=copcican_linux 18 | 19 | - build the CanFestival library: 20 | cd src 21 | make 22 | make install 23 | 24 | - build the CanFestival Unix library: 25 | cd drivers/unix 26 | make 27 | make install 28 | 29 | BUGFIX: 30 | copy library into build directory back: 31 | cp /usr/local/lib/libcanfestival_unix.a drivers/unix 32 | 33 | - build the CO-PCICAN driver interface: 34 | cd drivers/can_copcican_linux 35 | make 36 | make install 37 | 38 | - build the example application: 39 | cd examples/test_copcican_linux 40 | make 41 | 42 | Run test_copcican_linux to see it works... 43 | 44 | 45 | 46 | Copyright (C) 2010 Cosateq GmbH & Co.KG 47 | http://www.cosateq.com/ 48 | http://www.scale-rt.com/ 49 | 50 | -------------------------------------------------------------------------------- /doc/doxygen/Makefile: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Nicolas GRANDEMANGE 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | all: documentation 24 | 25 | clean: 26 | rm -rf html 27 | 28 | 29 | documentation: clean 30 | echo "Doxygen generation!!" 31 | doxygen Doxyfile 32 | #firefox html/index.html& 33 | 34 | -------------------------------------------------------------------------------- /doc/manual/Makefile: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Nicolas GRANDEMANGE 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | all: manual 25 | 26 | clean: 27 | cd en && \ 28 | rm -f manual.aux manual.log manual.out manual.toc manual.pdf && \ 29 | rm -rf html && \ 30 | mkdir html 31 | 32 | manual: clean 33 | cd en && \ 34 | pdflatex manual.tex && \ 35 | pdflatex manual.tex && \ 36 | cp manual.pdf ../../../objdictgen/doc/manual_en.pdf && \ 37 | latex2html -split 0 -dir html manual.tex 38 | -------------------------------------------------------------------------------- /doc/manual/en/Pictures/100000000000006D000000A31EC8CB54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/100000000000006D000000A31EC8CB54.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000000000000AA0000006014F74635.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000000000000AA0000006014F74635.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000000000000AB000000C88F594413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000000000000AB000000C88F594413.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000000000000AC000000C9C3F53FA6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000000000000AC000000C9C3F53FA6.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000000000000B6000000DF1EDD1E73.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000000000000B6000000DF1EDD1E73.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/100000000000022C000000DEDAD2140C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/100000000000022C000000DEDAD2140C.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/1000000000000396000000FFC42573DA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/1000000000000396000000FFC42573DA.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000000B7000000C66AF89CD5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000000B7000000C66AF89CD5.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000001C4000000DD129D4661.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000001C4000000DD129D4661.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000001C40000010766961D7F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000001C40000010766961D7F.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000001FC000001E5D65E8766.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000001FC000001E5D65E8766.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/1000020100000258000000832C6FFAB4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/1000020100000258000000832C6FFAB4.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000002DE000001D82D89C224.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000002DE000001D82D89C224.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000002F30000020B23ED7F67.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000002F30000020B23ED7F67.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000003440000025ACC3FD2F1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000003440000025ACC3FD2F1.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000003CA0000016604E6A5EF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000003CA0000016604E6A5EF.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000003E7000001C7B0296577.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000003E7000001C7B0296577.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000003F9000002CF880931E7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000003F9000002CF880931E7.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/10000201000003F9000002CF8B0CDAEA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/10000201000003F9000002CF8B0CDAEA.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/new_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/new_node.png -------------------------------------------------------------------------------- /doc/manual/en/Pictures/node_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/doc/manual/en/Pictures/node_info.png -------------------------------------------------------------------------------- /drivers/can_anagate_linux/Makefile: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = gcc 25 | OPT_CFLAGS = -O2 26 | CFLAGS = $(OPT_CFLAGS) 27 | PROG_CFLAGS = 28 | PREFIX = /usr/local 29 | TARGET = unix 30 | CAN_DRIVER = can_anagate_linux 31 | TIMERS_DRIVER = timers_unix 32 | ENABLE_DLL_DRIVERS=1 33 | CAN_DLL_CFLAGS= -lAnaGateAPIDLL -lAnaCommon 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 36 | 37 | OBJS = $(CAN_DRIVER).o 38 | 39 | ifeq ($(ENABLE_DLL_DRIVERS),1) 40 | CFLAGS += -fPIC 41 | DRIVER = libcanfestival_$(CAN_DRIVER).so 42 | else 43 | DRIVER = $(OBJS) 44 | endif 45 | 46 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 47 | 48 | all: driver 49 | 50 | driver: $(DRIVER) 51 | 52 | %.o: %.c 53 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 54 | 55 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 56 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 57 | 58 | install: libcanfestival_$(CAN_DRIVER).so 59 | mkdir -p $(PREFIX)/lib/ 60 | cp $< $(PREFIX)/lib/ 61 | 62 | uninstall: 63 | rm -f $(TARGET_SOFILES) 64 | 65 | clean: 66 | rm -f $(OBJS) 67 | 68 | mrproper: clean 69 | -------------------------------------------------------------------------------- /drivers/can_anagate_linux/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | PREFIX = SUB_PREFIX 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 33 | CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 36 | 37 | OBJS = $(CAN_DRIVER).o 38 | 39 | ifeq ($(ENABLE_DLL_DRIVERS),1) 40 | CFLAGS += -fPIC 41 | DRIVER = libcanfestival_$(CAN_DRIVER).so 42 | else 43 | DRIVER = $(OBJS) 44 | endif 45 | 46 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 47 | 48 | all: driver 49 | 50 | driver: $(DRIVER) 51 | 52 | %.o: %.c 53 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 54 | 55 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 56 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 57 | 58 | install: libcanfestival_$(CAN_DRIVER).so 59 | mkdir -p $(PREFIX)/lib/ 60 | cp $< $(PREFIX)/lib/ 61 | 62 | uninstall: 63 | rm -f $(TARGET_SOFILES) 64 | 65 | clean: 66 | rm -f $(OBJS) libcanfestival_$(CAN_DRIVER).so 67 | 68 | mrproper: clean 69 | -------------------------------------------------------------------------------- /drivers/can_anagate_win32/can_anagate_win32.def: -------------------------------------------------------------------------------- 1 | LIBRARY can_anagate_win32 2 | 3 | EXPORTS 4 | canReceive_driver 5 | canSend_driver 6 | canOpen_driver 7 | canClose_driver 8 | canChangeBaudRate_driver -------------------------------------------------------------------------------- /drivers/can_anagate_win32/can_anagate_win32.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Quelldateien 16 | 17 | 18 | 19 | 20 | Quelldateien 21 | 22 | 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | -------------------------------------------------------------------------------- /drivers/can_can4linux/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | PREFIX = SUB_PREFIX 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 33 | 34 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 35 | 36 | OBJS = $(CAN_DRIVER).o 37 | 38 | ifeq ($(ENABLE_DLL_DRIVERS),1) 39 | CFLAGS += -fPIC 40 | DRIVER = libcanfestival_$(CAN_DRIVER).so 41 | else 42 | DRIVER = $(OBJS) 43 | endif 44 | 45 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 46 | 47 | all: driver 48 | 49 | driver: $(DRIVER) 50 | 51 | %.o: %.c 52 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 53 | 54 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 55 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 56 | 57 | install: libcanfestival_$(CAN_DRIVER).so 58 | mkdir -p $(PREFIX)/lib/ 59 | cp $< $(PREFIX)/lib/ 60 | 61 | uninstall: 62 | rm -f $(TARGET_HFILES) 63 | 64 | clean: 65 | rm -f $(OBJS) libcanfestival_$(CAN_DRIVER).so 66 | 67 | mrproper: clean 68 | -------------------------------------------------------------------------------- /drivers/can_copcican_comedi/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2010 Cosateq GmbH & Co.KG 5 | # http://www.cosateq.com/ 6 | # http://www.scale-rt.com/ 7 | # 8 | # This file is part of canfestival, a library implementing the canopen 9 | # stack 10 | # 11 | # This library is free software; you can redistribute it and/or 12 | # modify it under the terms of the GNU Lesser General Public 13 | # License as published by the Free Software Foundation; either 14 | # version 2.1 of the License, or (at your option) any later version. 15 | # 16 | # This library is distributed in the hope that it will be useful, 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | # Lesser General Public License for more details. 20 | # 21 | # You should have received a copy of the GNU Lesser General Public 22 | # License along with this library; if not, write to the Free Software 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | # 25 | 26 | #ifneq ($(KERNELRELEASE),) 27 | # Kbuild part of Makefile 28 | TARGET = SUB_TARGET 29 | CAN_DRIVER = SUB_CAN_DRIVER 30 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 31 | 32 | EXTRA_CFLAGS := -I$(src)/../../include 33 | EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET) 34 | EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER) 35 | EXTRA_CFLAGS += -I/usr/src/comedi/include 36 | EXTRA_CFLAGS += SUB_PROG_CFLAGS 37 | 38 | obj-m := can_copcican_comedi.o 39 | can_copcican_comediko-objs = $(CAN_DRIVER).o 40 | 41 | #else 42 | # Normal Makefile 43 | PREFIX = SUB_PREFIX 44 | KERNELDIR := SUB_KERNELDIR 45 | 46 | all: driver 47 | 48 | driver: 49 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules 50 | 51 | clean: 52 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean 53 | rm -f Module.symvers 54 | 55 | mrproper: clean 56 | 57 | install: 58 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /drivers/can_copcican_comedi/co_pcicanops.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Cosateq GmbH & Co.KG 5 | http://www.cosateq.com/ 6 | http://www.scale-rt.com/ 7 | 8 | See COPYING file for copyrights details. 9 | 10 | This library is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2.1 of the License, or (at your option) any later version. 14 | 15 | This library is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | Lesser General Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public 21 | License along with this library; if not, write to the Free Software 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | */ 24 | 25 | /* 26 | COMEDI interface for CO-PCICAN card. 27 | */ 28 | 29 | #ifndef _CO_PCICANOPS_ 30 | #define _CO_PCICANOPS_ 31 | 32 | #define NUM_CAN_CHANNELS 4 33 | 34 | #define CMDQ_OPC_ENTER_RUN_MODE 0x01 35 | #define CMDQ_OPC_ENTER_CONFIG_MODE 0x02 36 | #define CMDQ_OPC_SET_CONFIG_CHANNEL 0xA2 37 | 38 | typedef struct message_t 39 | { 40 | unsigned long type; 41 | unsigned long size; 42 | unsigned long id; 43 | unsigned char data[8]; 44 | unsigned long timestamp_lo; 45 | unsigned long timestamp_hi; 46 | } MESSAGE_T; 47 | 48 | /*============================================================================= 49 | directions 50 | ===========================================================================*/ 51 | #define RX 0 52 | #define TX 1 53 | 54 | /*============================================================================= 55 | supported types 56 | ===========================================================================*/ 57 | #define MSG_EXT 0x00000001 58 | #define MSG_RTR 0x00000002 59 | 60 | 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /drivers/can_copcican_linux/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2010 Cosateq GmbH & Co.KG 5 | # http://www.cosateq.com/ 6 | # http://www.scale-rt.com/ 7 | # 8 | # This file is part of canfestival, a library implementing the canopen 9 | # stack 10 | # 11 | # This library is free software; you can redistribute it and/or 12 | # modify it under the terms of the GNU Lesser General Public 13 | # License as published by the Free Software Foundation; either 14 | # version 2.1 of the License, or (at your option) any later version. 15 | # 16 | # This library is distributed in the hope that it will be useful, 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | # Lesser General Public License for more details. 20 | # 21 | # You should have received a copy of the GNU Lesser General Public 22 | # License along with this library; if not, write to the Free Software 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | # 25 | 26 | CC = SUB_CC 27 | OPT_CFLAGS = -O2 28 | CFLAGS = SUB_OPT_CFLAGS 29 | PROG_CFLAGS = SUB_PROG_CFLAGS 30 | PREFIX = SUB_PREFIX 31 | TARGET = SUB_TARGET 32 | CAN_DRIVER = SUB_CAN_DRIVER 33 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 34 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 35 | CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS 36 | 37 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 38 | 39 | OBJS = $(CAN_DRIVER).o 40 | 41 | ifeq ($(ENABLE_DLL_DRIVERS),1) 42 | CFLAGS += -fPIC 43 | DRIVER = libcanfestival_$(CAN_DRIVER).so 44 | else 45 | DRIVER = $(OBJS) 46 | endif 47 | 48 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 49 | 50 | all: driver 51 | 52 | driver: $(DRIVER) 53 | 54 | %.o: %.c 55 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 56 | 57 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 58 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 59 | 60 | install: libcanfestival_$(CAN_DRIVER).so 61 | mkdir -p $(PREFIX)/lib/ 62 | cp $< $(PREFIX)/lib/ 63 | 64 | uninstall: 65 | rm -f $(TARGET_SOFILES) 66 | 67 | clean: 68 | rm -f $(OBJS) 69 | 70 | mrproper: clean 71 | -------------------------------------------------------------------------------- /drivers/can_copcican_win32/can_copcican_win32.def: -------------------------------------------------------------------------------- 1 | ; This file is part of CanFestival, a library implementing CanOpen Stack. 2 | ; 3 | ; CanFestival Copyright (C): Edouard TISSERANT and Francis DUPIN 4 | ; CanFestival Win32 port Copyright (C) 2007 Leonid Tochinski, ChattenAssociates, Inc. 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 | LIBRARY can_copcican_win32 23 | 24 | EXPORTS 25 | canReceive_driver 26 | canSend_driver 27 | canOpen_driver 28 | canClose_driver -------------------------------------------------------------------------------- /drivers/can_copcican_win32/can_copcican_win32.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | Source Files 21 | 22 | 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /drivers/can_copcican_win32/can_copcican_win32.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /drivers/can_copcican_win32/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | 14 | break; 15 | case DLL_THREAD_DETACH: 16 | case DLL_PROCESS_DETACH: 17 | 18 | break; 19 | } 20 | return TRUE; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /drivers/can_copcican_win32/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // can_copcican_win32.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /drivers/can_copcican_win32/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | // Windows Header Files: 12 | #include 13 | 14 | 15 | //#include "co_can.h" 16 | #include "public.h" 17 | #include "can_driver.h" 18 | #include "co_can_cinterface.h" 19 | 20 | // TODO: reference additional headers your program requires here 21 | -------------------------------------------------------------------------------- /drivers/can_copcican_win32/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /drivers/can_ixxat_win32/autoreleasecs.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | CanFestival Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | CanFestival Win32 port Copyright (C) 2007 Leonid Tochinski, ChattenAssociates, Inc. 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | // Critical Section Autorelease 25 | #ifndef __autoreleasecs_h__ 26 | #define __autoreleasecs_h__ 27 | 28 | class AutoReleaseCS 29 | { 30 | public: 31 | AutoReleaseCS(CRITICAL_SECTION& cs) : m_cs(cs) 32 | { 33 | ::EnterCriticalSection(&m_cs); 34 | } 35 | ~AutoReleaseCS() 36 | { 37 | ::LeaveCriticalSection(&m_cs); 38 | } 39 | CRITICAL_SECTION& m_cs; 40 | }; 41 | #endif // __autoreleasecs_h__ -------------------------------------------------------------------------------- /drivers/can_ixxat_win32/can_ixxat_win32.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | 34 | 35 | Source Files 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /drivers/can_ixxat_win32/ixxat.def: -------------------------------------------------------------------------------- 1 | ; This file is part of CanFestival, a library implementing CanOpen Stack. 2 | ; 3 | ; CanFestival Copyright (C): Edouard TISSERANT and Francis DUPIN 4 | ; CanFestival Win32 port Copyright (C) 2007 Leonid Tochinski, ChattenAssociates, Inc. 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 | LIBRARY IXXAT 23 | 24 | EXPORTS 25 | canReceive_driver 26 | canSend_driver 27 | canOpen_driver 28 | canClose_driver 29 | canChangeBaudRate_driver 30 | -------------------------------------------------------------------------------- /drivers/can_kvaser/README: -------------------------------------------------------------------------------- 1 | Kvaser driver for CANfestival, the open source CANopen stack. 2 | (C)2008 Giuseppe Massimo Bertani 3 | 4 | 5 | This driver should work with any Kvaser product compatible with Kvaser's CANLIB4. 6 | I tested it with CAN Leaf Professional (USB-CAN adapter) on a Suse10.1 Linux box 7 | and CANLIB 4.72 Beta (Oct 1,2007). 8 | 9 | In order to compile the driver, you should already be able to run the CANlib examples, 10 | and tools, to be sure that CANLIB is able to detect and drive your device. 11 | 12 | ------------------------------------------------------------------------------------------------- 13 | NOTES ABOUT CANLIB4 14 | 15 | Since the "Leaf" device was added recently to CANLIB, I had to download the latest linuxcan4 16 | library sources from http://www.kvaser.com instead of use the CD software shipped with the device. 17 | 18 | -------------------------------------------------------------------------------------------------- 19 | NOTES ABOUT WINDOWS 20 | 21 | Sadly, Kvaser's Win32 CANLIB is not provided with sources, so CANLIB cannot be build with GNU 22 | tools. LIB files for MSVC and BCC are provided with the DLL but the DLL itself is stripped and 23 | I've tried an entire day to compile this driver under Cygwin without success, despite 24 | Wu Yongwei's hints (http://www.geocities.com/yongweiwu/dllfaq.htm). 25 | 26 | This does not mean that it's an impossible task, but probably I left out something important. 27 | Temporary KO. 28 | 29 | ------------------------------------------------------------------------------------------------- 30 | 31 | GMB 23/1/08 32 | -------------------------------------------------------------------------------- /drivers/can_lincan/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | PREFIX = SUB_PREFIX 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 33 | 34 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 35 | 36 | OBJS = $(CAN_DRIVER).o 37 | 38 | ifeq ($(ENABLE_DLL_DRIVERS),1) 39 | CFLAGS += -fPIC 40 | DRIVER = libcanfestival_$(CAN_DRIVER).so 41 | else 42 | DRIVER = $(OBJS) 43 | endif 44 | 45 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 46 | 47 | all: driver 48 | 49 | driver: $(DRIVER) 50 | 51 | %.o: %.c 52 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 53 | 54 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 55 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 56 | 57 | install: libcanfestival_$(CAN_DRIVER).so 58 | mkdir -p $(PREFIX)/lib/ 59 | cp $< $(PREFIX)/lib/ 60 | 61 | uninstall: 62 | rm -f $(TARGET_HFILES) 63 | 64 | clean: 65 | rm -f $(OBJS) libcanfestival_$(CAN_DRIVER).so 66 | 67 | mrproper: clean 68 | -------------------------------------------------------------------------------- /drivers/can_multi_peeakwin32/can_multi_peak_win32.def: -------------------------------------------------------------------------------- 1 | LIBRARY can_multi_peak_win32 2 | 3 | EXPORTS 4 | canReceive_driver 5 | canSend_driver 6 | canOpen_driver 7 | canClose_driver 8 | canChangeBaudRate_driver -------------------------------------------------------------------------------- /drivers/can_peak_linux/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | PREFIX = SUB_PREFIX 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 33 | CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 36 | 37 | OBJS = $(CAN_DRIVER).o 38 | 39 | ifeq ($(ENABLE_DLL_DRIVERS),1) 40 | CFLAGS += -fPIC 41 | DRIVER = libcanfestival_$(CAN_DRIVER).so 42 | else 43 | DRIVER = $(OBJS) 44 | endif 45 | 46 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 47 | 48 | all: driver 49 | 50 | driver: $(DRIVER) 51 | 52 | %.o: %.c 53 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 54 | 55 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 56 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so -o $@ $< $(CAN_DLL_CFLAGS) 57 | 58 | install: libcanfestival_$(CAN_DRIVER).so 59 | mkdir -p $(PREFIX)/lib/ 60 | cp $< $(PREFIX)/lib/ 61 | 62 | uninstall: 63 | rm -f $(TARGET_SOFILES) 64 | 65 | clean: 66 | rm -f $(OBJS) libcanfestival_$(CAN_DRIVER).so 67 | 68 | mrproper: clean 69 | -------------------------------------------------------------------------------- /drivers/can_peak_win32/can_peak_win32.def: -------------------------------------------------------------------------------- 1 | LIBRARY can_peak_win32 2 | 3 | EXPORTS 4 | canReceive_driver 5 | canSend_driver 6 | canOpen_driver 7 | canClose_driver 8 | canChangeBaudRate_driver -------------------------------------------------------------------------------- /drivers/can_peak_win32/can_peak_win32.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | 28 | 29 | Header Files 30 | 31 | 32 | -------------------------------------------------------------------------------- /drivers/can_peak_win32/cancfg.h.head: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __CANCFG_H__ 24 | #define __CANCFG_H__ 25 | 26 | 27 | #if defined(__CYGWIN__) 28 | #include 29 | #else 30 | #include 31 | #endif 32 | 33 | // Following part of the file is copied by configure script 34 | // from choosen PcanLight header file 35 | //------------------------------------------------------------------------------- 36 | //------------------------------------------------------------------------------- 37 | //------------------------------------------------------------------------------- 38 | -------------------------------------------------------------------------------- /drivers/can_peak_win32/cancfg.h.tail: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------- 2 | //------------------------------------------------------------------------------- 3 | //------------------------------------------------------------------------------- 4 | 5 | #endif 6 | -------------------------------------------------------------------------------- /drivers/can_socket/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | PREFIX = SUB_PREFIX 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 33 | CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 36 | 37 | OBJS = $(CAN_DRIVER).o 38 | 39 | ifeq ($(ENABLE_DLL_DRIVERS),1) 40 | CFLAGS += -fPIC 41 | DRIVER = libcanfestival_$(CAN_DRIVER).so 42 | else 43 | DRIVER = $(OBJS) 44 | endif 45 | 46 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 47 | 48 | all: driver 49 | 50 | driver: $(DRIVER) 51 | 52 | %.o: %.c 53 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 54 | 55 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 56 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 57 | 58 | install: libcanfestival_$(CAN_DRIVER).so 59 | mkdir -p $(PREFIX)/lib/ 60 | cp $< $(PREFIX)/lib/ 61 | 62 | uninstall: 63 | rm -f $(TARGET_SOFILES) 64 | 65 | clean: 66 | rm -f $(OBJS) libcanfestival_$(CAN_DRIVER).so 67 | 68 | mrproper: clean 69 | -------------------------------------------------------------------------------- /drivers/can_tcp_win32/Socket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/drivers/can_tcp_win32/Socket.cpp -------------------------------------------------------------------------------- /drivers/can_tcp_win32/Socket.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/drivers/can_tcp_win32/Socket.h -------------------------------------------------------------------------------- /drivers/can_uvccm_win32/can_uvccm_win32.def: -------------------------------------------------------------------------------- 1 | ; This file is part of CanFestival, a library implementing CanOpen Stack. 2 | ; 3 | ; CanFestival Copyright (C): Edouard TISSERANT and Francis DUPIN 4 | ; CanFestival Win32 port Copyright (C) 2007 Leonid Tochinski, ChattenAssociates, Inc. 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 | LIBRARY can_uvccm_win32 23 | 24 | EXPORTS 25 | canReceive_driver 26 | canSend_driver 27 | canOpen_driver 28 | canClose_driver 29 | -------------------------------------------------------------------------------- /drivers/can_uvccm_win32/can_uvccm_win32.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | -------------------------------------------------------------------------------- /drivers/can_virtual/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | PREFIX = SUB_PREFIX 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS 33 | CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) 36 | 37 | OBJS = $(CAN_DRIVER).o 38 | 39 | ifeq ($(ENABLE_DLL_DRIVERS),1) 40 | CFLAGS += -fPIC 41 | DRIVER = libcanfestival_$(CAN_DRIVER).so 42 | else 43 | DRIVER = $(OBJS) 44 | endif 45 | 46 | TARGET_SOFILES = $(PREFIX)/lib/$(DRIVER) 47 | 48 | all: driver 49 | 50 | driver: $(DRIVER) 51 | 52 | %.o: %.c 53 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 54 | 55 | libcanfestival_$(CAN_DRIVER).so: $(OBJS) 56 | $(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $< 57 | 58 | install: libcanfestival_$(CAN_DRIVER).so 59 | mkdir -p $(PREFIX)/lib/ 60 | cp $< $(PREFIX)/lib/ 61 | 62 | uninstall: 63 | rm -f $(TARGET_SOFILES) 64 | 65 | clean: 66 | rm -f $(OBJS) 67 | 68 | mrproper: clean 69 | -------------------------------------------------------------------------------- /drivers/can_virtual_kernel/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | #ifneq ($(KERNELRELEASE),) 25 | # Kbuild part of Makefile 26 | TARGET = SUB_TARGET 27 | CAN_DRIVER = SUB_CAN_DRIVER 28 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 29 | 30 | EXTRA_CFLAGS := -I$(src)/../../include 31 | EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET) 32 | EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER) 33 | EXTRA_CFLAGS += SUB_PROG_CFLAGS 34 | 35 | obj-m := can_virtual.o 36 | can_virtual-objs = $(CAN_DRIVER).o 37 | 38 | #else 39 | # Normal Makefile 40 | PREFIX = SUB_PREFIX 41 | KERNELDIR := SUB_KERNELDIR 42 | 43 | all: driver 44 | 45 | driver: 46 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules 47 | 48 | clean: 49 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean 50 | rm -f Module.symvers 51 | 52 | mrproper: clean 53 | 54 | install: 55 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /drivers/cm0/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2014 François Beaulier 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | PROG_CFLAGS = SUB_PROG_CFLAGS 26 | 27 | LIB_ROOT = ../../include/cm0/stlib 28 | 29 | INCLUDES = -I../../include \ 30 | -I../../include/cm0 \ 31 | -I$(LIB_ROOT)/STM32F0xx_StdPeriph_Driver/inc \ 32 | -I$(LIB_ROOT)/CMSIS/Device/ST/STM32F0xx/Include/ \ 33 | -I$(LIB_ROOT)/CMSIS/Include \ 34 | -I. 35 | 36 | DEFINES = -DSTM32F072 -DUSE_STDPERIPH_DRIVER 37 | 38 | CFLAGS = $(PROG_CFLAGS) $(DEFINES) 39 | 40 | OBJS = cm0.o 41 | 42 | all: driver 43 | 44 | driver: $(OBJS) 45 | 46 | libcandriver.a: $(OBJS) 47 | @echo " " 48 | @echo "*********************************************" 49 | @echo "**Building libcandriver for arm cortex-M0 50 | @echo "*********************************************" 51 | ar rc $@ $(OBJS) 52 | ranlib $@ 53 | 54 | %.o: %.c 55 | @echo " " 56 | @echo "*********************************************" 57 | @echo "**Compiling $< -> $@" 58 | @echo "*********************************************" 59 | $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 60 | 61 | clean: 62 | rm -f $(OBJS) 63 | 64 | mrproper: clean 65 | 66 | -------------------------------------------------------------------------------- /drivers/cm0/README: -------------------------------------------------------------------------------- 1 | This is a short how to for ARM Cortex-M0 MCU support in Canfestival 2 | ------------------------------------------------------------------- 3 | 4 | Only the STM32F072 is supported but code should be easily ported to other CM0 5 | MCUs. 6 | The code use the ST periph lib so you need access to the headers. 7 | This is done thrue the LIB_ROOT var in the Makefiles or with a symlink. 8 | See below how to set this up. 9 | 10 | First put the toolchain binaries in your PATH : 11 | #export PATH=$PATH:/path/to/my/toolchain/bin 12 | 13 | run the canfestival configure script : 14 | #./configure --target=cm0 15 | 16 | If your toolchain prefix is not arm-none-eabi- you can use --cc=my-prefix-gcc 17 | but you will have to add your CFLAGS in the Makefiles. 18 | 19 | There are two Makefiles involved : src/Makefile and drivers/cm0/Makefile 20 | Edit those two and adapt the LIB_ROOT path to your need, or better make in 21 | include/cm0 a symlink called stlib to the periph driver lib : 22 | #cd include/cm0 23 | #ln -s ~/path/to/stlib/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/ stdlib 24 | 25 | Finaly go to canfestival root directory and type: 26 | #make 27 | 28 | For simplification the driver/cm0 code is put in src/libcanfestival.a with all 29 | the stack code. So you only have to link with one library. 30 | 31 | François Beaulier 32 | November 17th 2014 33 | 34 | -------------------------------------------------------------------------------- /drivers/cm0/cm0.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __MAIN_H 3 | #define __MAIN_H 4 | 5 | #include "stm32f0xx.h" 6 | 7 | // CAN bus defines for STM32F072 8 | 9 | #define CANx CAN 10 | #define CAN_CLK RCC_APB1Periph_CAN 11 | #define CAN_RX_PIN GPIO_Pin_11 12 | #define CAN_TX_PIN GPIO_Pin_12 13 | #define CAN_GPIO_PORT GPIOA 14 | #define CAN_GPIO_CLK RCC_AHBPeriph_GPIOA 15 | #define CAN_AF_PORT GPIO_AF_4 16 | #define CAN_RX_SOURCE GPIO_PinSource11 17 | #define CAN_TX_SOURCE GPIO_PinSource12 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /drivers/cm3/README: -------------------------------------------------------------------------------- 1 | WARNING: 2 | -------- 3 | Set cm3.h according to the STM32 family you are using : F103 or F105 4 | Uncomment the right block 5 | 6 | This is a short how to for ARM Cortex-M3 MCU support in Canfestival 7 | ------------------------------------------------------------------- 8 | 9 | Only the STM32F103 is supported but code should be easily ported to other CM3 10 | MCUs. 11 | The code use the ST periph lib so you need access to the headers. 12 | This is done thrue the LIB_ROOT var in the Makefiles or with a symlink. 13 | See below how to set this up. 14 | 15 | First put the toolchain binaries in your PATH : 16 | #export PATH=$PATH:/path/to/my/toolchain/bin 17 | 18 | run the canfestival configure script : 19 | #./configure ./configure --target=cm3 20 | 21 | If your toolchain prefix is not arm-none-eabi- you can use --cc=my-prefix-gcc 22 | but you will have to add your CFLAGS in the Makefiles. 23 | 24 | There are two Makefiles involved : src/Makefile and drivers/cm3/Makefile 25 | Edit those two and adapt the LIB_ROOT path to your need, or better make in 26 | include/cm3 a symlink called stlib to the periph driver lib : 27 | #cd include/cm3 28 | #ln -s ~/path/to/stlib/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/ stdlib 29 | 30 | Finaly go to canfestival root directory and type: 31 | #make 32 | 33 | For simplification the driver/cm3 code is put in src/libcanfestival.a with all 34 | the stack code. So you only have to link with one library. 35 | 36 | François Beaulier 37 | September 16th 2014 38 | 39 | -------------------------------------------------------------------------------- /drivers/cm3/cm3.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __MAIN_H 3 | #define __MAIN_H 4 | 5 | #include "stm32f10x.h" 6 | 7 | // CAN bus defines for STM32F103 8 | /* 9 | #define CANx CAN1 10 | #define CAN_CLK RCC_APB1Periph_CAN1 11 | #define CAN_RX_PIN GPIO_Pin_8 12 | #define CAN_TX_PIN GPIO_Pin_9 13 | #define CAN_GPIO_PORT GPIOB 14 | #define CAN_GPIO_CLK RCC_APB2Periph_GPIOB 15 | */ 16 | 17 | // CAN bus defines for STM32F105 18 | #define CANx CAN1 19 | #define CAN_CLK RCC_APB1Periph_CAN1 20 | #define CAN_RX_PIN GPIO_Pin_11 21 | #define CAN_TX_PIN GPIO_Pin_12 22 | #define CAN_GPIO_PORT GPIOA 23 | #define CAN_GPIO_CLK RCC_APB2Periph_GPIOA 24 | 25 | 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /drivers/cm4/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2014 François Beaulier 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | PROG_CFLAGS = SUB_PROG_CFLAGS 26 | 27 | LIB_ROOT = ../../include/cm4/stlib 28 | 29 | INCLUDES = -I../../include \ 30 | -I../../include/cm4 \ 31 | -I$(LIB_ROOT)/STM32F37x_StdPeriph_Driver/inc \ 32 | -I$(LIB_ROOT)/CMSIS/Include \ 33 | -I$(LIB_ROOT)/CMSIS/Device/ST/STM32F37x/Include 34 | 35 | DEFINES = -DSTM32F3XX -DUSE_STDPERIPH_DRIVER 36 | 37 | CFLAGS = $(PROG_CFLAGS) $(DEFINES) 38 | 39 | OBJS = cm4.o 40 | 41 | all: driver 42 | 43 | driver: $(OBJS) 44 | 45 | libcandriver.a: $(OBJS) 46 | @echo " " 47 | @echo "*********************************************" 48 | @echo "**Building libcandriver for arm cortex-M4 49 | @echo "*********************************************" 50 | ar rc $@ $(OBJS) 51 | ranlib $@ 52 | 53 | %.o: %.c 54 | @echo " " 55 | @echo "*********************************************" 56 | @echo "**Compiling $< -> $@" 57 | @echo "*********************************************" 58 | $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 59 | 60 | clean: 61 | rm -f $(OBJS) 62 | 63 | mrproper: clean 64 | 65 | -------------------------------------------------------------------------------- /drivers/cm4/README: -------------------------------------------------------------------------------- 1 | This is a short how to for ARM Cortex-M4 MCU support in Canfestival 2 | ------------------------------------------------------------------- 3 | 4 | Only the STM32F373 is supported but code should be easily ported to other CM4 5 | MCUs. 6 | The code use the ST periph lib so you need access to the headers. 7 | This is done thrue the LIB_ROOT var in the Makefiles or with a symlink. 8 | See below how to set this up. 9 | 10 | First put the toolchain binaries in your PATH : 11 | #export PATH=$PATH:/path/to/my/toolchain/bin 12 | 13 | run the canfestival configure script : 14 | #./configure ./configure --target=cm4 15 | 16 | If your toolchain prefix is not arm-none-eabi- you can use --cc=my-prefix-gcc 17 | but you will have to add your CFLAGS in the Makefiles. 18 | 19 | There are two Makefiles involved : src/Makefile and drivers/cm4/Makefile 20 | Edit those two and adapt the LIB_ROOT path to your need, or better make in 21 | include/cm4 a symlink called stlib to the periph driver lib : 22 | #cd include/cm4 23 | #ln -s ~/STM32F37x_DSP_StdPeriph_Lib_V1.0.0/Libraries/ stdlib 24 | 25 | Finaly go to canfestival root directory and type: 26 | #make 27 | 28 | For simplification the driver/cm4 code is put in src/libcanfestival.a with all 29 | the stack code. So you only have to link with one library. 30 | 31 | François Beaulier 32 | May 1st 2014 33 | 34 | -------------------------------------------------------------------------------- /drivers/cm4/cm4.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __MAIN_H 3 | #define __MAIN_H 4 | 5 | #include "stm32f37x.h" 6 | 7 | // CAN bus defines for cortex-M4 STM32F373 8 | 9 | #define CANx CAN1 10 | #define CAN_CLK RCC_APB1Periph_CAN1 11 | #define CAN_RX_PIN GPIO_Pin_8 12 | #define CAN_TX_PIN GPIO_Pin_9 13 | #define CAN_GPIO_PORT GPIOB 14 | #define CAN_GPIO_CLK RCC_AHBPeriph_GPIOB 15 | #define CAN_AF_PORT GPIO_AF_9 16 | #define CAN_RX_SOURCE GPIO_PinSource8 17 | #define CAN_TX_SOURCE GPIO_PinSource9 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /drivers/hcs12/interrupt.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | Functions called by interrupts vectors. 25 | */ 26 | /* 27 | This is a part of the driver, of course ! 28 | But you have to put your code in this functions, 29 | if you plan to use interruptions. 30 | */ 31 | 32 | #include "../include/data.h" 33 | #include "../include/hcs12/applicfg.h" 34 | #include "../include/hcs12/error.h" 35 | #include "../include/hcs12/candriver.h" 36 | #include "../include/hcs12/asm-m68hc12/regs.h" 37 | #include "../include/hcs12/asm-m68hc12/portsaccess.h" 38 | #include "../include/hcs12/asm-m68hc12/ports_def.h" 39 | #include "../include/hcs12/asm-m68hc12/ports.h" 40 | #include "../include/hcs12/interrupt.h" 41 | 42 | extern volatile char msgRecu; 43 | extern volatile Message canMsgRcv; 44 | 45 | 46 | 47 | /* Inhibe les interruptions */ 48 | 49 | void lock (void) 50 | { 51 | unsigned short mask; 52 | __asm__ __volatile__ ("tpa\n\tsei" : "=d"(mask)); 53 | 54 | } 55 | 56 | /* Autorise les interruptions */ 57 | void unlock (void) 58 | { 59 | __asm__ __volatile__ ("cli"); 60 | } 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /drivers/hcs12/ports.s: -------------------------------------------------------------------------------- 1 | /* 2 | Define the i/o port global symbol 3 | */ 4 | 5 | .globl _io_ports 6 | _io_ports=0x0000 7 | 8 | /* 9 | 0x0000 is the default mapping at reset. (it is 0x1000 for 68hc11) 10 | */ 11 | -------------------------------------------------------------------------------- /drivers/timers_kernel/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | #ifneq ($(KERNELRELEASE),) 25 | # Kbuild part of Makefile 26 | TARGET = SUB_TARGET 27 | CAN_DRIVER = SUB_CAN_DRIVER 28 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 29 | 30 | EXTRA_CFLAGS := -I$(src)/../../include 31 | EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET) 32 | EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER) 33 | EXTRA_CFLAGS += -I$(src)/../../include/$(TIMERS_DRIVER) 34 | EXTRA_CFLAGS += SUB_PROG_CFLAGS 35 | 36 | obj-m := $(TIMERS_DRIVER).o 37 | 38 | #else 39 | # Normal Makefile 40 | PREFIX = SUB_PREFIX 41 | KERNELDIR := SUB_KERNELDIR 42 | 43 | all: driver 44 | 45 | driver: 46 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules 47 | 48 | clean: 49 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean 50 | rm -f Module.symvers 51 | 52 | mrproper: clean 53 | 54 | install: 55 | 56 | 57 | #endif -------------------------------------------------------------------------------- /drivers/timers_kernel_xeno/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2010 Cosateq GmbH & Co.KG 5 | # http://www.cosateq.com/ 6 | # http://www.scale-rt.com/ 7 | # 8 | # This file is part of canfestival, a library implementing the canopen 9 | # stack 10 | # 11 | # This library is free software; you can redistribute it and/or 12 | # modify it under the terms of the GNU Lesser General Public 13 | # License as published by the Free Software Foundation; either 14 | # version 2.1 of the License, or (at your option) any later version. 15 | # 16 | # This library is distributed in the hope that it will be useful, 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | # Lesser General Public License for more details. 20 | # 21 | # You should have received a copy of the GNU Lesser General Public 22 | # License along with this library; if not, write to the Free Software 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | # 25 | 26 | #ifneq ($(KERNELRELEASE),) 27 | # Kbuild part of Makefile 28 | TARGET = SUB_TARGET 29 | CAN_DRIVER = SUB_CAN_DRIVER 30 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 31 | 32 | EXTRA_CFLAGS := -I$(src)/../../include 33 | EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET) 34 | EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER) 35 | EXTRA_CFLAGS += -I$(src)/../../include/$(TIMERS_DRIVER) 36 | EXTRA_CFLAGS += SUB_PROG_CFLAGS 37 | 38 | obj-m := $(TIMERS_DRIVER).o 39 | 40 | #else 41 | # Normal Makefile 42 | PREFIX = SUB_PREFIX 43 | KERNELDIR := SUB_KERNELDIR 44 | 45 | all: driver 46 | 47 | driver: 48 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules 49 | 50 | clean: 51 | $(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean 52 | rm -f Module.symvers 53 | 54 | mrproper: clean 55 | 56 | install: 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /drivers/timers_rtai/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | OS_NAME = SUB_OS_NAME 29 | ARCH_NAME = SUB_ARCH_NAME 30 | PREFIX = SUB_PREFIX 31 | TARGET = SUB_TARGET 32 | CAN_DRIVER = SUB_CAN_DRIVER 33 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) 36 | 37 | OBJS = $(TIMERS_DRIVER).o 38 | 39 | SRC_HFILES = ../../include/$(TIMERS_DRIVER)/timerscfg.h 40 | 41 | TARGET_HFILES = $(PREFIX)/include/canfestival/timerscfg.h 42 | 43 | all: driver 44 | 45 | driver: $(OBJS) 46 | 47 | %.o: %.c 48 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 49 | 50 | install: 51 | mkdir -p $(PREFIX)/include/canfestival 52 | cp $(SRC_HFILES) $(PREFIX)/include/canfestival 53 | 54 | uninstall: 55 | rm -f $(TARGET_HFILES) 56 | 57 | clean: 58 | rm -f $(OBJS) 59 | 60 | mrproper: clean 61 | -------------------------------------------------------------------------------- /drivers/timers_unix/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 -fPIC 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | OS_NAME = SUB_OS_NAME 29 | ARCH_NAME = SUB_ARCH_NAME 30 | PREFIX = SUB_PREFIX 31 | TARGET = SUB_TARGET 32 | CAN_DRIVER = SUB_CAN_DRIVER 33 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) 36 | 37 | OBJS = $(TIMERS_DRIVER).o 38 | 39 | SRC_HFILES = ../../include/$(TIMERS_DRIVER)/timerscfg.h 40 | 41 | TARGET_HFILES = $(PREFIX)/include/canfestival/timerscfg.h 42 | 43 | all: driver 44 | 45 | driver: $(OBJS) 46 | 47 | %.o: %.c 48 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 49 | 50 | install: 51 | mkdir -p $(PREFIX)/include/canfestival 52 | cp $(SRC_HFILES) $(PREFIX)/include/canfestival 53 | 54 | uninstall: 55 | rm -f $(TARGET_HFILES) 56 | 57 | clean: 58 | rm -f $(OBJS) 59 | 60 | mrproper: clean 61 | 62 | 63 | -------------------------------------------------------------------------------- /drivers/timers_win32/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | CXX = SUB_CXX 26 | LD = SUB_LD 27 | OPT_CFLAGS = -O2 28 | CFLAGS = SUB_OPT_CFLAGS 29 | PROG_CFLAGS = SUB_PROG_CFLAGS 30 | OS_NAME = SUB_OS_NAME 31 | ARCH_NAME = SUB_ARCH_NAME 32 | PREFIX = SUB_PREFIX 33 | TARGET = SUB_TARGET 34 | CAN_DRIVER = SUB_CAN_DRIVER 35 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 36 | 37 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) 38 | 39 | OBJS = $(TIMERS_DRIVER).o 40 | 41 | SRC_HFILES = ../../include/$(TIMERS_DRIVER)/timerscfg.h 42 | 43 | TARGET_HFILES = $(PREFIX)/include/canfestival/timerscfg.h 44 | 45 | all: driver 46 | 47 | driver: $(OBJS) 48 | 49 | %.o: %.c 50 | $(CXX) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 51 | 52 | install: 53 | mkdir -p $(PREFIX)/include/canfestival 54 | cp $(SRC_HFILES) $(PREFIX)/include/canfestival 55 | 56 | uninstall: 57 | rm -f $(TARGET_HFILES) 58 | 59 | clean: 60 | rm -f $(OBJS) 61 | 62 | mrproper: clean 63 | 64 | 65 | -------------------------------------------------------------------------------- /drivers/timers_xeno/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CC = SUB_CC 25 | OPT_CFLAGS = -O2 26 | CFLAGS = SUB_OPT_CFLAGS 27 | PROG_CFLAGS = SUB_PROG_CFLAGS 28 | OS_NAME = SUB_OS_NAME 29 | ARCH_NAME = SUB_ARCH_NAME 30 | PREFIX = SUB_PREFIX 31 | TARGET = SUB_TARGET 32 | CAN_DRIVER = SUB_CAN_DRIVER 33 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 34 | 35 | INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) 36 | 37 | OBJS = $(TIMERS_DRIVER).o 38 | 39 | SRC_HFILES = ../../include/$(TIMERS_DRIVER)/timerscfg.h 40 | 41 | TARGET_HFILES = $(PREFIX)/include/canfestival/timerscfg.h 42 | 43 | all: driver 44 | 45 | driver: $(OBJS) 46 | 47 | %.o: %.c 48 | $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< 49 | 50 | install: 51 | mkdir -p $(PREFIX)/include/canfestival 52 | cp $(SRC_HFILES) $(PREFIX)/include/canfestival 53 | 54 | uninstall: 55 | rm -f $(TARGET_HFILES) 56 | 57 | clean: 58 | rm -f $(OBJS) 59 | 60 | mrproper: clean 61 | -------------------------------------------------------------------------------- /examples/AT91/Master/ObjDict.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef OBJDICT_H 5 | #define OBJDICT_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * ObjDict_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data ObjDict_Data; 15 | extern UNS8 DI1; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern UNS8 DI2; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern UNS8 DO1; /* Mapped at index 0x2100, subindex 0x00*/ 18 | extern UNS8 DO2; /* Mapped at index 0x2101, subindex 0x00*/ 19 | 20 | #endif // OBJDICT_H 21 | -------------------------------------------------------------------------------- /examples/AT91/Master/io_macro.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | ARM Port: Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _IO_MACRO 25 | #define _IO_MACRO 26 | 27 | // Macros for set and clear bits in I/O registers 28 | #define setbit(address,bit) (address |= (1< 2 | -------------------------------------------------------------------------------- /examples/AVR/Slave/Atmel-Studio/SlaveAVR.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "SlaveAVR", "SlaveAVR.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|AVR = Debug|AVR 11 | Release|AVR = Release|AVR 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.ActiveCfg = Debug|AVR 15 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR 16 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR 17 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /examples/AVR/Slave/ObjDict.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef OBJDICT_H 5 | #define OBJDICT_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * ObjDict_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data ObjDict_Data; 15 | extern UNS8 Read_Inputs_8_Bit[1]; /* Mapped at index 0x6000, subindex 0x01 - 0x01 */ 16 | extern UNS8 Polarity_Input_8_Bit[1]; /* Mapped at index 0x6002, subindex 0x01 - 0x01 */ 17 | extern UNS8 Filter_Constant_Input_8_Bit[1]; /* Mapped at index 0x6003, subindex 0x01 - 0x01 */ 18 | extern UNS8 Global_Interrupt_Enable_Digital; /* Mapped at index 0x6005, subindex 0x00*/ 19 | extern UNS8 Interrupt_Mask_Any_Change_8_Bit[1]; /* Mapped at index 0x6006, subindex 0x01 - 0x01 */ 20 | extern UNS8 Interrupt_Mask_Low_to_High_8_Bit[1]; /* Mapped at index 0x6007, subindex 0x01 - 0x01 */ 21 | extern UNS8 Interrupt_Mask_High_to_Low_8_Bit[1]; /* Mapped at index 0x6008, subindex 0x01 - 0x01 */ 22 | extern UNS8 Write_Outputs_8_Bit[1]; /* Mapped at index 0x6200, subindex 0x01 - 0x01 */ 23 | extern UNS8 Change_Polarity_Outputs_8_Bit[1]; /* Mapped at index 0x6202, subindex 0x01 - 0x01 */ 24 | extern UNS8 Error_Mode_Outputs_8_Bit[1]; /* Mapped at index 0x6206, subindex 0x01 - 0x01 */ 25 | extern UNS8 Error_Value_Outputs_8_Bit[1]; /* Mapped at index 0x6207, subindex 0x01 - 0x01 */ 26 | 27 | #endif // OBJDICT_H 28 | -------------------------------------------------------------------------------- /examples/AVR/Slave/ds401.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Andreas GLAUSER 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 | // DS 401 Digital IO handling according DS 401 V2.1 "Device Profile for Generic I/O Modules" 24 | 25 | #ifndef __DS_401_h__ 26 | #define __DS_401_h__ 27 | 28 | // Includes for the Canfestival 29 | #include "canfestival.h" 30 | #include "timer.h" 31 | #include "ObjDict.h" 32 | 33 | 34 | unsigned char digital_input_handler(CO_Data* d, unsigned char *newInput, unsigned char size); 35 | 36 | unsigned char digital_output_handler(CO_Data* d, unsigned char *newOuput, unsigned char size); 37 | 38 | unsigned char analog_input_handler(CO_Data* d, unsigned int *newInput, unsigned char size); 39 | 40 | unsigned char analog_output_handler(CO_Data* d, unsigned int *newOutput, unsigned char size); 41 | 42 | #endif //__DS_401_h__ 43 | -------------------------------------------------------------------------------- /examples/AVR/Slave/hardware.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AVR Port: Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | /****************************************************************************** 24 | MCU ports and Bits 25 | Makros for access on hardware 26 | ******************************************************************************/ 27 | 28 | #ifndef _HARDWARE_INCLUDED 29 | #define _HARDWARE_INCLUDED 30 | 31 | /****************************************************************************** 32 | Makros for bit access on the ports and registers 33 | ******************************************************************************/ 34 | // Macros for set and clear bits in I/O registers 35 | #define setbit(address,bit) ((address) |= (1<<(bit))) 36 | #define clearbit(address,bit) ((address) &= ~(1<<(bit))) 37 | #define togglebit(address,bit) ((address) ^= (1<<(bit))) 38 | 39 | // Macro for testing of a single bit in an I/O location 40 | #define checkbit(address,bit) ((address) & (1<<(bit))) 41 | 42 | /************************** Hardware Makros **********************************/ 43 | 44 | // Read the inputs 45 | #define get_inputs() (~PINA) 46 | #define read_bcd() (~PINC & 0x0F) 47 | // Write the outputs 48 | #define set_outputs(val) PORTB = ~(val) 49 | 50 | #endif // _HARDWARE_INCLUDED 51 | 52 | 53 | -------------------------------------------------------------------------------- /examples/CANOpenShell/CANOpenShell.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifdef USE_XENO 23 | #define eprintf(...) 24 | #else 25 | #define eprintf(...) printf (__VA_ARGS__) 26 | #endif 27 | 28 | #include "canfestival.h" 29 | 30 | void help(void); 31 | void StartNode(UNS8); 32 | void StopNode(UNS8); 33 | void ResetNode(UNS8); 34 | void DiscoverNodes(void); 35 | void CheckReadInfoSDO(CO_Data*, UNS8); 36 | void GetSlaveNodeInfo(UNS8); 37 | void CheckReadSDO(CO_Data*, UNS8); 38 | void CheckWriteSDO(CO_Data*, UNS8); 39 | void ReadDeviceEntry(char*); 40 | void WriteDeviceEntry(char*); 41 | void SleepFunction(int); 42 | -------------------------------------------------------------------------------- /examples/CANOpenShell/CANOpenShell.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /examples/CANOpenShell/CANOpenShellsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CANOpenShell", "CANOpenShell.vcproj", "{06B3C378-9EE4-4C56-A519-775FF499DAB5}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {06B3C378-9EE4-4C56-A519-775FF499DAB5}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {06B3C378-9EE4-4C56-A519-775FF499DAB5}.Debug|Win32.Build.0 = Debug|Win32 14 | {06B3C378-9EE4-4C56-A519-775FF499DAB5}.Release|Win32.ActiveCfg = Release|Win32 15 | {06B3C378-9EE4-4C56-A519-775FF499DAB5}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/DS401_Master/TestMaster.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef TESTMASTER_H 5 | #define TESTMASTER_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * TestMaster_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data TestMaster_Data; 15 | extern UNS8 DO; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern INTEGER16 AO1; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern INTEGER16 AO2; /* Mapped at index 0x2002, subindex 0x00*/ 18 | extern INTEGER16 AO3; /* Mapped at index 0x2003, subindex 0x00*/ 19 | extern INTEGER16 AO4; /* Mapped at index 0x2004, subindex 0x00*/ 20 | extern INTEGER16 AI1; /* Mapped at index 0x2005, subindex 0x00*/ 21 | extern INTEGER16 AI2; /* Mapped at index 0x2006, subindex 0x00*/ 22 | extern INTEGER16 AI3; /* Mapped at index 0x2007, subindex 0x00*/ 23 | extern INTEGER16 AI4; /* Mapped at index 0x2008, subindex 0x00*/ 24 | extern INTEGER16 AI5; /* Mapped at index 0x2009, subindex 0x00*/ 25 | extern INTEGER16 AI6; /* Mapped at index 0x200A, subindex 0x00*/ 26 | extern INTEGER16 AI7; /* Mapped at index 0x200B, subindex 0x00*/ 27 | extern INTEGER16 AI8; /* Mapped at index 0x200C, subindex 0x00*/ 28 | extern UNS8 DI1; /* Mapped at index 0x200F, subindex 0x00*/ 29 | extern UNS8 DI2; /* Mapped at index 0x2010, subindex 0x00*/ 30 | extern UNS8 DI3; /* Mapped at index 0x2011, subindex 0x00*/ 31 | extern UNS8 DI4; /* Mapped at index 0x2012, subindex 0x00*/ 32 | extern UNS8 DI5; /* Mapped at index 0x2013, subindex 0x00*/ 33 | extern UNS8 DI6; /* Mapped at index 0x2014, subindex 0x00*/ 34 | extern UNS8 DI7; /* Mapped at index 0x2015, subindex 0x00*/ 35 | extern UNS8 DI8; /* Mapped at index 0x2016, subindex 0x00*/ 36 | 37 | #endif // TESTMASTER_H 38 | -------------------------------------------------------------------------------- /examples/DS401_Master/TestMasterMicroMod.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifdef USE_XENO 23 | #define eprintf(...) 24 | #else 25 | #define eprintf(...) printf (__VA_ARGS__) 26 | #endif 27 | 28 | #include "canfestival.h" 29 | 30 | /* 31 | #define CAN_FIFO_LENGTH 100 32 | 33 | #define DECLARE_A_CAN_FIFO \ 34 | static Message FIFO[CAN_FIFO_LENGTH];\ 35 | static int FIFO_First = 0;\ 36 | static int FIFO_Last = 0;\ 37 | \ 38 | static void PutInFIFO(Message *m)\ 39 | {\ 40 | FIFO[FIFO_Last++] = *m;\ 41 | FIFO_Last %= CAN_FIFO_LENGTH;\ 42 | }\ 43 | \ 44 | static void GetFromFIFO(Message *m)\ 45 | {\ 46 | *m = FIFO[FIFO_First++];\ 47 | FIFO_First %= CAN_FIFO_LENGTH;\ 48 | }\ 49 | \ 50 | static void TransmitMessage(CO_Data* d, UNS32 id)\ 51 | {\ 52 | Message m;\ 53 | GetFromFIFO(&m);\ 54 | canDispatch(d, &m);\ 55 | } 56 | */ 57 | -------------------------------------------------------------------------------- /examples/DS401_Master/TestMasterMicroMod.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/DS401_Slave_Gui/CallBack.h: -------------------------------------------------------------------------------- 1 | #ifndef CALLBACK_H_ 2 | #define CALLBACK_H_ 3 | 4 | extern "C" 5 | { 6 | #include "ObjDict.h" 7 | } 8 | 9 | void Call_heartbeatError (CO_Data * d, UNS8); 10 | 11 | UNS8 Call_canSend (Message *); 12 | 13 | void Call_initialisation (CO_Data * d); 14 | void Call_preOperational (CO_Data * d); 15 | void Call_operational (CO_Data * d); 16 | void Call_stopped (CO_Data * d); 17 | 18 | void Call_post_sync (CO_Data * d); 19 | void Call_post_TPDO (CO_Data * d); 20 | void Call_storeODSubIndex (CO_Data * d, UNS16 wIndex, UNS8 bSubindex); 21 | 22 | #endif /*CALLBACK_H_ */ 23 | -------------------------------------------------------------------------------- /examples/DS401_Slave_Gui/ObjDict.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef OBJDICT_H 5 | #define OBJDICT_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * ObjDict_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data ObjDict_Data; 15 | extern UNS8 Read_Inputs_8_Bit[1]; /* Mapped at index 0x6000, subindex 0x01 - 0x01 */ 16 | extern UNS8 Polarity_Input_8_Bit[1]; /* Mapped at index 0x6002, subindex 0x01 - 0x01 */ 17 | extern UNS8 Write_Outputs_8_Bit[1]; /* Mapped at index 0x6200, subindex 0x01 - 0x01 */ 18 | extern UNS8 Change_Polarity_Outputs_8_Bit[1]; /* Mapped at index 0x6202, subindex 0x01 - 0x01 */ 19 | extern UNS8 Error_Mode_Outputs_8_Bit[1]; /* Mapped at index 0x6206, subindex 0x01 - 0x01 */ 20 | extern UNS8 Error_Value_Outputs_8_Bit[1]; /* Mapped at index 0x6207, subindex 0x01 - 0x01 */ 21 | extern INTEGER16 Read_Analogue_Input_16_Bit[8]; /* Mapped at index 0x6401, subindex 0x01 - 0x08 */ 22 | extern INTEGER16 Write_Analogue_Output_16_Bit[4]; /* Mapped at index 0x6411, subindex 0x01 - 0x04 */ 23 | extern UNS8 Analogue_Input_Global_Interrupt_Enable; /* Mapped at index 0x6423, subindex 0x00*/ 24 | extern UNS32 Analogue_Input_Interrupt_Delta_Unsigned[8]; /* Mapped at index 0x6426, subindex 0x01 - 0x08 */ 25 | extern UNS8 Analogue_Output_Error_Mode[4]; /* Mapped at index 0x6443, subindex 0x01 - 0x04 */ 26 | extern INTEGER32 Analogue_Output_Error_Value_Integer[4]; /* Mapped at index 0x6444, subindex 0x01 - 0x04 */ 27 | 28 | #endif // OBJDICT_H 29 | -------------------------------------------------------------------------------- /examples/DS401_Slave_Gui/TestSlaveGui.h: -------------------------------------------------------------------------------- 1 | #ifndef TESTSLAVEGUI_H_ 2 | #define TESTSLAVEGUI_H_ 3 | 4 | extern "C" 5 | { 6 | #include "canfestival.h" 7 | } 8 | 9 | int main_can (s_BOARD SlaveBoard, char *LibraryPath); 10 | void stop_slave (); 11 | 12 | #endif /*TESTSLAVEGUI_H_ */ 13 | -------------------------------------------------------------------------------- /examples/SillySlave/EDS2CSV.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # -*- coding: iso-8859-1 -*- 4 | # 5 | # 6 | # FILE: EDS2CSV.py 7 | # BEGIN: Nov 30,2007 8 | # AUTHOR: Giuseppe Massimo Bertani 9 | # EMAIL gmbertani@users.sourceforge.net 10 | # 11 | # This program is free software; you can redistribute it and/or modify 12 | # it under the terms of the GNU General Public License as published by 13 | # the Free Software Foundation; either version 2 of the License, or 14 | # (at your option) any later version. 15 | # 16 | # Coding style params: 17 | # skips=4 18 | # are replaced with blanks 19 | # 20 | # 21 | 22 | import sys 23 | import os 24 | import ConfigParser as cp 25 | 26 | if (len(sys.argv) != 2): 27 | print "Usage:" 28 | print 29 | print "EDS2CSV.py " 30 | print 31 | print 32 | sys.exit(0) 33 | 34 | EDSname = os.path.abspath( os.path.dirname(sys.argv[1]) ) + '/' + sys.argv[1] 35 | 36 | if (os.path.exists(EDSname) is not True): 37 | print 38 | print "Input file ",EDS2CSV," not found." 39 | print 40 | print 41 | sys.exit(0) 42 | 43 | eds = cp.ConfigParser() 44 | eds.read(EDSname) 45 | 46 | ssorted = sorted(eds.sections()) 47 | 48 | # dump entire EDS file to stdout in CSV format comma separated 49 | print "Object Dictionary,",sys.argv[1] 50 | print 51 | for section in ssorted: 52 | print section 53 | print ",", 54 | osorted = sorted(eds.options(section)) 55 | for option in osorted: 56 | print option, ",", 57 | print 58 | print ",", 59 | for option in osorted: 60 | print eds.get(section, option), ",", 61 | print 62 | print 63 | 64 | -------------------------------------------------------------------------------- /examples/SillySlave/README: -------------------------------------------------------------------------------- 1 | SillySlave example for CANfestival 2 | 3 | Its purpose is only to check if the selected 4 | driver works at least a minimum. The PC running this demo 5 | must be connected through CAN bus to a working master that 6 | recognizes the slave nodeId. The slave should be configured 7 | by the master, then switched to operative. After that, when 8 | the master sends a SYNC, the slave answers with PDO1, 9 | containing an integer that increments each time it is sent. 10 | 11 | Please have a look to main.h to tune the master and slave node IDs 12 | 13 | It's all. Enjoy it. 14 | GMB 15 | jan 17,2008 16 | 17 | -------------------------------------------------------------------------------- /examples/SillySlave/SillySlave.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef SILLYSLAVE_H 5 | #define SILLYSLAVE_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 SillySlave_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * SillySlave_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data SillySlave_Data; 15 | extern UNS8 LifeSignal; /* Mapped at index 0x2001, subindex 0x00*/ 16 | 17 | #endif // SILLYSLAVE_H 18 | -------------------------------------------------------------------------------- /examples/SillySlave/main.h: -------------------------------------------------------------------------------- 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 39 | #include "getopt.h" 40 | void pause(void); 41 | #else 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #endif 48 | 49 | #include "canfestival.h" 50 | 51 | /* 52 | * Please tune the following defines to suit your needs: 53 | */ 54 | #define NODE_MASTER 0x1 55 | #define NODE_SLAVE 0x40 56 | #define DRIVER_LIBRARY "can_ixxat_win32.dll" 57 | #define BAUDRATE 125 58 | #define BUS 0 59 | 60 | #endif /* _MAIN_H */ 61 | 62 | -------------------------------------------------------------------------------- /examples/SillySlave/slave.h: -------------------------------------------------------------------------------- 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 slave.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 | #include "data.h" 35 | 36 | INTEGER8 InitCANdevice( UNS8 bus, UNS32 baudrate, UNS8 node ); 37 | 38 | void SillySlave_heartbeatError(CO_Data* d, UNS8); 39 | 40 | UNS8 SillySlave_canSend(Message *); 41 | 42 | void SillySlave_initialisation(CO_Data* d); 43 | void SillySlave_preOperational(CO_Data* d); 44 | void SillySlave_operational(CO_Data* d); 45 | void SillySlave_stopped(CO_Data* d); 46 | 47 | void SillySlave_post_sync(CO_Data* d); 48 | void SillySlave_post_TPDO(CO_Data* d); 49 | void SillySlave_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex); 50 | void SillySlave_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 51 | 52 | -------------------------------------------------------------------------------- /examples/TestMasterMicroMod/TestMaster.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef TESTMASTER_H 5 | #define TESTMASTER_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * TestMaster_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data TestMaster_Data; 15 | extern UNS8 DO; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern UNS8 DI1; /* Mapped at index 0x200F, subindex 0x00*/ 17 | extern UNS8 DI2; /* Mapped at index 0x2010, subindex 0x00*/ 18 | extern UNS8 DI3; /* Mapped at index 0x2011, subindex 0x00*/ 19 | extern UNS8 DI4; /* Mapped at index 0x2012, subindex 0x00*/ 20 | extern UNS8 DI5; /* Mapped at index 0x2013, subindex 0x00*/ 21 | extern UNS8 DI6; /* Mapped at index 0x2014, subindex 0x00*/ 22 | extern UNS8 DI7; /* Mapped at index 0x2015, subindex 0x00*/ 23 | extern UNS8 DI8; /* Mapped at index 0x2016, subindex 0x00*/ 24 | 25 | #endif // TESTMASTER_H 26 | -------------------------------------------------------------------------------- /examples/TestMasterMicroMod/TestMasterMicroMod.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifdef USE_XENO 23 | #define eprintf(...) 24 | #else 25 | #define eprintf(...) printf (__VA_ARGS__) 26 | #endif 27 | 28 | #include "canfestival.h" 29 | 30 | /* 31 | #define CAN_FIFO_LENGTH 100 32 | 33 | #define DECLARE_A_CAN_FIFO \ 34 | static Message FIFO[CAN_FIFO_LENGTH];\ 35 | static int FIFO_First = 0;\ 36 | static int FIFO_Last = 0;\ 37 | \ 38 | static void PutInFIFO(Message *m)\ 39 | {\ 40 | FIFO[FIFO_Last++] = *m;\ 41 | FIFO_Last %= CAN_FIFO_LENGTH;\ 42 | }\ 43 | \ 44 | static void GetFromFIFO(Message *m)\ 45 | {\ 46 | *m = FIFO[FIFO_First++];\ 47 | FIFO_First %= CAN_FIFO_LENGTH;\ 48 | }\ 49 | \ 50 | static void TransmitMessage(CO_Data* d, UNS32 id)\ 51 | {\ 52 | Message m;\ 53 | GetFromFIFO(&m);\ 54 | canDispatch(d, &m);\ 55 | } 56 | */ 57 | -------------------------------------------------------------------------------- /examples/TestMasterSlave/Master.h: -------------------------------------------------------------------------------- 1 | #include "TestMaster.h" 2 | 3 | void TestMaster_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestMaster_canSend(Message *); 6 | 7 | void TestMaster_initialisation(CO_Data* d); 8 | void TestMaster_preOperational(CO_Data* d); 9 | void TestMaster_operational(CO_Data* d); 10 | void TestMaster_stopped(CO_Data* d); 11 | 12 | void TestMaster_post_sync(CO_Data* d); 13 | void TestMaster_post_TPDO(CO_Data* d); 14 | void TestMaster_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 15 | void TestMaster_post_SlaveBootup(CO_Data* d, UNS8 nodeid); 16 | -------------------------------------------------------------------------------- /examples/TestMasterSlave/Slave.h: -------------------------------------------------------------------------------- 1 | #include "TestSlave.h" 2 | 3 | void TestSlave_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestSlave_canSend(Message *); 6 | 7 | void TestSlave_initialisation(CO_Data* d); 8 | void TestSlave_preOperational(CO_Data* d); 9 | void TestSlave_operational(CO_Data* d); 10 | void TestSlave_stopped(CO_Data* d); 11 | 12 | void TestSlave_post_sync(CO_Data* d); 13 | void TestSlave_post_TPDO(CO_Data* d); 14 | void TestSlave_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex); 15 | void TestSlave_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 16 | -------------------------------------------------------------------------------- /examples/TestMasterSlave/TestMaster.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef TESTMASTER_H 5 | #define TESTMASTER_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * TestMaster_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data TestMaster_Data; 15 | extern UNS8 MasterMap1; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern UNS8 MasterMap2; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern UNS8 MasterMap3; /* Mapped at index 0x2002, subindex 0x00*/ 18 | extern UNS8 MasterMap4; /* Mapped at index 0x2003, subindex 0x00*/ 19 | extern UNS8 MasterMap5; /* Mapped at index 0x2004, subindex 0x00*/ 20 | extern UNS8 MasterMap6; /* Mapped at index 0x2005, subindex 0x00*/ 21 | extern UNS8 MasterMap7; /* Mapped at index 0x2006, subindex 0x00*/ 22 | extern UNS8 MasterMap8; /* Mapped at index 0x2007, subindex 0x00*/ 23 | extern UNS8 MasterMap9; /* Mapped at index 0x2008, subindex 0x00*/ 24 | extern UNS32 MasterMap10; /* Mapped at index 0x2009, subindex 0x00*/ 25 | extern UNS16 MasterMap11; /* Mapped at index 0x200A, subindex 0x00*/ 26 | extern INTEGER16 MasterMap12; /* Mapped at index 0x200B, subindex 0x00*/ 27 | extern INTEGER16 MasterMap13; /* Mapped at index 0x200C, subindex 0x00*/ 28 | 29 | #endif // TESTMASTER_H 30 | -------------------------------------------------------------------------------- /examples/TestMasterSlave/TestMasterSlave.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifdef USE_XENO 23 | //#define eprintf(...) if(0){} 24 | #define eprintf(...) 25 | #elif defined USE_RTAI 26 | #define eprintf(...) 27 | #else 28 | #define eprintf(...) printf (__VA_ARGS__) 29 | #endif 30 | 31 | #include "canfestival.h" 32 | 33 | /* 34 | #define CAN_FIFO_LENGTH 100 35 | 36 | #define DECLARE_A_CAN_FIFO \ 37 | static Message FIFO[CAN_FIFO_LENGTH];\ 38 | static int FIFO_First = 0;\ 39 | static int FIFO_Last = 0;\ 40 | \ 41 | static void PutInFIFO(Message *m)\ 42 | {\ 43 | FIFO[FIFO_Last++] = *m;\ 44 | FIFO_Last %= CAN_FIFO_LENGTH;\ 45 | }\ 46 | \ 47 | static void GetFromFIFO(Message *m)\ 48 | {\ 49 | *m = FIFO[FIFO_First++];\ 50 | FIFO_First %= CAN_FIFO_LENGTH;\ 51 | }\ 52 | \ 53 | static void TransmitMessage(CO_Data* d, UNS32 id)\ 54 | {\ 55 | Message m;\ 56 | GetFromFIFO(&m);\ 57 | canDispatch(d, &m);\ 58 | } 59 | */ 60 | -------------------------------------------------------------------------------- /examples/TestMasterSlave/TestSlave.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef TESTSLAVE_H 5 | #define TESTSLAVE_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 TestSlave_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * TestSlave_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data TestSlave_Data; 15 | extern UNS8 SlaveMap1; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern UNS8 SlaveMap2; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern UNS8 SlaveMap3; /* Mapped at index 0x2002, subindex 0x00*/ 18 | extern UNS8 SlaveMap4; /* Mapped at index 0x2003, subindex 0x00*/ 19 | extern UNS8 SlaveMap5; /* Mapped at index 0x2004, subindex 0x00*/ 20 | extern UNS8 SlaveMap6; /* Mapped at index 0x2005, subindex 0x00*/ 21 | extern UNS8 SlaveMap7; /* Mapped at index 0x2006, subindex 0x00*/ 22 | extern UNS8 SlaveMap8; /* Mapped at index 0x2007, subindex 0x00*/ 23 | extern UNS8 SlaveMap9; /* Mapped at index 0x2008, subindex 0x00*/ 24 | extern UNS32 SlaveMap10; /* Mapped at index 0x2009, subindex 0x00*/ 25 | extern UNS16 SlaveMap11; /* Mapped at index 0x200A, subindex 0x00*/ 26 | extern INTEGER16 SlaveMap12; /* Mapped at index 0x200B, subindex 0x00*/ 27 | extern INTEGER16 SlaveMap13; /* Mapped at index 0x200C, subindex 0x00*/ 28 | 29 | #endif // TESTSLAVE_H 30 | -------------------------------------------------------------------------------- /examples/TestMasterSlaveLSS/Master.h: -------------------------------------------------------------------------------- 1 | #include "TestMaster.h" 2 | 3 | void TestMaster_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestMaster_canSend(Message *); 6 | 7 | void TestMaster_initialisation(CO_Data* d); 8 | void TestMaster_preOperational(CO_Data* d); 9 | void TestMaster_operational(CO_Data* d); 10 | void TestMaster_stopped(CO_Data* d); 11 | 12 | void TestMaster_post_sync(CO_Data* d); 13 | void TestMaster_post_TPDO(CO_Data* d); 14 | void TestMaster_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 15 | void TestMaster_post_SlaveBootup(CO_Data* d, UNS8 nodeid); 16 | 17 | -------------------------------------------------------------------------------- /examples/TestMasterSlaveLSS/SlaveA.h: -------------------------------------------------------------------------------- 1 | #include "TestSlaveA.h" 2 | 3 | void TestSlaveA_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestSlaveA_canSend(Message *); 6 | 7 | void TestSlaveA_initialisation(CO_Data* d); 8 | void TestSlaveA_preOperational(CO_Data* d); 9 | void TestSlaveA_operational(CO_Data* d); 10 | void TestSlaveA_stopped(CO_Data* d); 11 | 12 | void TestSlaveA_post_sync(CO_Data* d); 13 | void TestSlaveA_post_TPDO(CO_Data* d); 14 | void TestSlaveA_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex); 15 | void TestSlaveA_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 16 | void TestSlaveA_NMT_Slave_Communications_Reset_Callback(CO_Data* d); 17 | void TestSlaveA_StoreConfiguration(CO_Data* d, UNS8 *error, UNS8 *spec_error); 18 | -------------------------------------------------------------------------------- /examples/TestMasterSlaveLSS/SlaveB.h: -------------------------------------------------------------------------------- 1 | #include "TestSlaveB.h" 2 | 3 | void TestSlaveB_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestSlaveB_canSend(Message *); 6 | 7 | void TestSlaveB_initialisation(CO_Data* d); 8 | void TestSlaveB_preOperational(CO_Data* d); 9 | void TestSlaveB_operational(CO_Data* d); 10 | void TestSlaveB_stopped(CO_Data* d); 11 | 12 | void TestSlaveB_post_sync(CO_Data* d); 13 | void TestSlaveB_post_TPDO(CO_Data* d); 14 | void TestSlaveB_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex); 15 | void TestSlaveB_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 16 | void TestSlaveB_NMT_Slave_Communications_Reset_Callback(CO_Data* d); 17 | void TestSlaveB_StoreConfiguration(CO_Data* d, UNS8 *error, UNS8 *spec_error); 18 | -------------------------------------------------------------------------------- /examples/TestMasterSlaveLSS/TestMasterSlaveLSS.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifdef USE_XENO 23 | //#define eprintf(...) if(0){} 24 | #define eprintf(...) 25 | #else 26 | #define eprintf(...) printf (__VA_ARGS__) 27 | #endif 28 | 29 | #include "canfestival.h" 30 | 31 | /* 32 | #define CAN_FIFO_LENGTH 100 33 | 34 | #define DECLARE_A_CAN_FIFO \ 35 | static Message FIFO[CAN_FIFO_LENGTH];\ 36 | static int FIFO_First = 0;\ 37 | static int FIFO_Last = 0;\ 38 | \ 39 | static void PutInFIFO(Message *m)\ 40 | {\ 41 | FIFO[FIFO_Last++] = *m;\ 42 | FIFO_Last %= CAN_FIFO_LENGTH;\ 43 | }\ 44 | \ 45 | static void GetFromFIFO(Message *m)\ 46 | {\ 47 | *m = FIFO[FIFO_First++];\ 48 | FIFO_First %= CAN_FIFO_LENGTH;\ 49 | }\ 50 | \ 51 | static void TransmitMessage(CO_Data* d, UNS32 id)\ 52 | {\ 53 | Message m;\ 54 | GetFromFIFO(&m);\ 55 | canDispatch(d, &m);\ 56 | } 57 | */ 58 | -------------------------------------------------------------------------------- /examples/gene_SYNC_HCS12/objdict.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef OBJDICT_H 5 | #define OBJDICT_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * gene_SYNC_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data gene_SYNC_Data; 15 | extern UNS16 acceptanceFilter1; /* Mapped at index 0x2015, subindex 0x00*/ 16 | extern UNS16 acceptanceFilter2; /* Mapped at index 0x2016, subindex 0x00*/ 17 | extern UNS16 acceptanceFilter3; /* Mapped at index 0x2017, subindex 0x00*/ 18 | extern UNS16 acceptanceFilter4; /* Mapped at index 0x2018, subindex 0x00*/ 19 | extern UNS16 mask1; /* Mapped at index 0x2019, subindex 0x00*/ 20 | extern UNS16 mask2; /* Mapped at index 0x2020, subindex 0x00*/ 21 | extern UNS16 mask3; /* Mapped at index 0x2021, subindex 0x00*/ 22 | extern UNS16 mask4; /* Mapped at index 0x2022, subindex 0x00*/ 23 | extern UNS8 applyDownloadedFilters; /* Mapped at index 0x2023, subindex 0x00*/ 24 | 25 | #endif // OBJDICT_H 26 | -------------------------------------------------------------------------------- /examples/gene_SYNC_HCS12/trace32_flash_debug.cmm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/examples/gene_SYNC_HCS12/trace32_flash_debug.cmm -------------------------------------------------------------------------------- /examples/gene_SYNC_HCS12/trace32_flash_debug_sans_init.cmm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/examples/gene_SYNC_HCS12/trace32_flash_debug_sans_init.cmm -------------------------------------------------------------------------------- /examples/gene_SYNC_HCS12/trace32_flash_programmer.cmm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/examples/gene_SYNC_HCS12/trace32_flash_programmer.cmm -------------------------------------------------------------------------------- /examples/kerneltest/Master.h: -------------------------------------------------------------------------------- 1 | #include "TestMaster.h" 2 | 3 | void TestMaster_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestMaster_canSend(Message *); 6 | 7 | void TestMaster_initialisation(CO_Data* d); 8 | void TestMaster_preOperational(CO_Data* d); 9 | void TestMaster_operational(CO_Data* d); 10 | void TestMaster_stopped(CO_Data* d); 11 | 12 | void TestMaster_post_sync(CO_Data* d); 13 | void TestMaster_post_TPDO(CO_Data* d); 14 | void TestMaster_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 15 | void TestMaster_post_SlaveBootup(CO_Data* d, UNS8 nodeid); 16 | -------------------------------------------------------------------------------- /examples/kerneltest/Slave.h: -------------------------------------------------------------------------------- 1 | #include "TestSlave.h" 2 | 3 | void TestSlave_heartbeatError(CO_Data* d, UNS8); 4 | 5 | UNS8 TestSlave_canSend(Message *); 6 | 7 | void TestSlave_initialisation(CO_Data* d); 8 | void TestSlave_preOperational(CO_Data* d); 9 | void TestSlave_operational(CO_Data* d); 10 | void TestSlave_stopped(CO_Data* d); 11 | 12 | void TestSlave_post_sync(CO_Data* d); 13 | void TestSlave_post_TPDO(CO_Data* d); 14 | void TestSlave_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex); 15 | void TestSlave_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]); 16 | -------------------------------------------------------------------------------- /examples/kerneltest/TestMaster.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef TESTMASTER_H 5 | #define TESTMASTER_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * TestMaster_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data TestMaster_Data; 15 | extern UNS8 MasterMap1; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern UNS8 MasterMap2; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern UNS8 MasterMap3; /* Mapped at index 0x2002, subindex 0x00*/ 18 | extern UNS8 MasterMap4; /* Mapped at index 0x2003, subindex 0x00*/ 19 | extern UNS8 MasterMap5; /* Mapped at index 0x2004, subindex 0x00*/ 20 | extern UNS8 MasterMap6; /* Mapped at index 0x2005, subindex 0x00*/ 21 | extern UNS8 MasterMap7; /* Mapped at index 0x2006, subindex 0x00*/ 22 | extern UNS8 MasterMap8; /* Mapped at index 0x2007, subindex 0x00*/ 23 | extern UNS8 MasterMap9; /* Mapped at index 0x2008, subindex 0x00*/ 24 | extern UNS32 MasterMap10; /* Mapped at index 0x2009, subindex 0x00*/ 25 | extern UNS16 MasterMap11; /* Mapped at index 0x200A, subindex 0x00*/ 26 | extern INTEGER16 MasterMap12; /* Mapped at index 0x200B, subindex 0x00*/ 27 | extern INTEGER16 MasterMap13; /* Mapped at index 0x200C, subindex 0x00*/ 28 | 29 | #endif // TESTMASTER_H 30 | -------------------------------------------------------------------------------- /examples/kerneltest/TestMasterSlave.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef TESTMASTERSLAVE_H 24 | #define TESTMASTERSLAVE_H 25 | 26 | #define eprintf(...) printk (KERN_INFO __VA_ARGS__) 27 | 28 | int TestMasterSlave_start (void); 29 | void TestMasterSlave_stop (void); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /examples/kerneltest/TestSlave.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef TESTSLAVE_H 5 | #define TESTSLAVE_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 TestSlave_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * TestSlave_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data TestSlave_Data; 15 | extern UNS8 SlaveMap1; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern UNS8 SlaveMap2; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern UNS8 SlaveMap3; /* Mapped at index 0x2002, subindex 0x00*/ 18 | extern UNS8 SlaveMap4; /* Mapped at index 0x2003, subindex 0x00*/ 19 | extern UNS8 SlaveMap5; /* Mapped at index 0x2004, subindex 0x00*/ 20 | extern UNS8 SlaveMap6; /* Mapped at index 0x2005, subindex 0x00*/ 21 | extern UNS8 SlaveMap7; /* Mapped at index 0x2006, subindex 0x00*/ 22 | extern UNS8 SlaveMap8; /* Mapped at index 0x2007, subindex 0x00*/ 23 | extern UNS8 SlaveMap9; /* Mapped at index 0x2008, subindex 0x00*/ 24 | extern UNS32 SlaveMap10; /* Mapped at index 0x2009, subindex 0x00*/ 25 | extern UNS16 SlaveMap11; /* Mapped at index 0x200A, subindex 0x00*/ 26 | extern INTEGER16 SlaveMap12; /* Mapped at index 0x200B, subindex 0x00*/ 27 | extern INTEGER16 SlaveMap13; /* Mapped at index 0x200C, subindex 0x00*/ 28 | 29 | #endif // TESTSLAVE_H 30 | -------------------------------------------------------------------------------- /examples/kerneltest/console/console.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "console.h" 9 | 10 | 11 | void showhelp(void) { 12 | printf("\nCanFestival kernel test example console\n\n"); 13 | 14 | printf("start - start example\n"); 15 | printf("stop - stop example\n"); 16 | printf("quit - quit console\n"); 17 | printf("\n"); 18 | } 19 | 20 | int main(int argc,char *argv[]) 21 | { 22 | int canf_ktest_dev, cmd; 23 | char command[10]; 24 | char device_path[20] = "/dev/"; 25 | 26 | // create absolute path name for device 27 | strcat (device_path, DEVICE_NAME); 28 | 29 | canf_ktest_dev = open (device_path, O_WRONLY); 30 | 31 | if (canf_ktest_dev == -1) { 32 | perror ("Opening device"); 33 | return 1; 34 | } 35 | 36 | showhelp(); 37 | 38 | while (1) { 39 | printf("> "); 40 | scanf ("%s", &command); 41 | 42 | if (strcmp(command,"start") == 0) 43 | cmd = CMD_START; 44 | 45 | else if (strcmp(command,"stop") == 0) 46 | cmd = CMD_STOP; 47 | 48 | else if (strcmp(command,"quit") == 0) 49 | break; 50 | 51 | else { 52 | printf("Bad command\n"); 53 | continue; 54 | } 55 | 56 | write(canf_ktest_dev, &cmd, sizeof(cmd)); 57 | } 58 | 59 | close(canf_ktest_dev); 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /examples/kerneltest/console/console.h: -------------------------------------------------------------------------------- 1 | #ifndef __canftest_console_h__ 2 | #define __canftest_console_h__ 3 | 4 | #define DEVICE_NAME "canf_ktest" 5 | 6 | #define CMD_START '1' 7 | #define CMD_STOP '2' 8 | 9 | #endif // __canftest_console.h__ 10 | -------------------------------------------------------------------------------- /examples/kerneltest/insert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | module="canf_ktest" 4 | device="canf_ktest" 5 | mode="664" 6 | 7 | # insert neccessary modules 8 | /sbin/insmod ../../drivers/can_virtual_kernel/can_virtual.ko 9 | /sbin/insmod ../../src/canfestival.ko 10 | 11 | # insert module with all arguments we got 12 | # and use a pathname, as newer modutils don't look in . by default 13 | /sbin/insmod ./$module.ko $* || exit 1 14 | 15 | # remove stale nodes 16 | rm -f /dev/${device} 17 | 18 | # create device file 19 | major=$(awk "\$2==\"$device\" {print \$1; exit}" /proc/devices) 20 | mknod /dev/${device} c $major 0 21 | 22 | # give appropriate group/permissions, and change the group. 23 | # Not all distributions have staff, some have "wheel" instead. 24 | group="staff" 25 | grep -q '^staff:' /etc/group || group="wheel" 26 | chgrp $group /dev/${device} 27 | chmod $mode /dev/${device} 28 | -------------------------------------------------------------------------------- /examples/kerneltest/remove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | module="canf_ktest" 4 | device="canf_ktest" 5 | 6 | /sbin/rmmod $module || exit 1 7 | /sbin/rmmod canfestival 8 | /sbin/rmmod can_virtual 9 | 10 | rm -f /dev/${device} 11 | 12 | -------------------------------------------------------------------------------- /examples/kerneltest/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /bin/sh insert.sh 4 | 5 | console/canf_ktest_console 6 | 7 | /bin/sh remove.sh 8 | -------------------------------------------------------------------------------- /examples/linux/dcf/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2015 Francois Beaulier 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | CANFESTIVAL_DIR = ../../.. 25 | OPT_CFLAGS = -O2 -Wall -g 26 | CC = SUB_CC 27 | CFLAGS = SUB_OPT_CFLAGS 28 | EXE_CFLAGS = SUB_EXE_CFLAGS 29 | TARGET = SUB_TARGET 30 | CAN_DRIVER = SUB_CAN_DRIVER 31 | TIMERS_DRIVER = SUB_TIMERS_DRIVER 32 | ENABLE_SHARED = SUB_ENABLE_SHARED 33 | 34 | INCLUDES = -I$(CANFESTIVAL_DIR)/include -I$(CANFESTIVAL_DIR)/include/$(TARGET) 35 | INCLUDES += -I$(CANFESTIVAL_DIR)/include/$(TIMERS_DRIVER) 36 | 37 | ifeq ($(ENABLE_SHARED),1) 38 | LIBS = -L../../../src -L../../../drivers/unix -lcanfestival -lcanfestival_$(TARGET) 39 | else 40 | LIBS = $(CANFESTIVAL_DIR)/src/libcanfestival.a $(CANFESTIVAL_DIR)/drivers/$(TARGET)/libcanfestival_$(TARGET).a 41 | endif 42 | 43 | OBJS_SLAVE = slave.o slavedic.o 44 | OBJS_MASTER = master.o masterdic.o gendcf.o 45 | 46 | %.o: %.c 47 | $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $< 48 | 49 | all: master slave 50 | 51 | slave: $(OBJS_SLAVE) 52 | $(CC) $(CFLAGS) $(INCLUDES) -o $@ $(OBJS_SLAVE) $(LIBS) $(EXE_CFLAGS) 53 | 54 | master: $(OBJS_MASTER) 55 | $(CC) $(CFLAGS) $(INCLUDES) -o $@ $(OBJS_MASTER) $(LIBS) $(EXE_CFLAGS) 56 | 57 | clean: 58 | rm -f $(OBJS_MASTER) $(OBJS_SLAVE) 59 | rm -f slave master 60 | 61 | -------------------------------------------------------------------------------- /examples/linux/dcf/README: -------------------------------------------------------------------------------- 1 | This file is part of CanFestival, a library implementing CanOpen Stack. 2 | 3 | F Beaulier October 15 / 2015 4 | 5 | examples/linux/dcf 6 | 7 | A DCF example for Linux 8 | ------------------------ 9 | This project is quite different from other examples. 10 | It is a much more recent one, and the way CanFestival is initialized is a bit different. 11 | Besides DCF, it shows how to write canopen master and slave with CanFestival under Linux OS, how to attach callbacks 12 | to objdict entries and more. 13 | 14 | The master use a txt file (dcfdata.txt) in order to fill index 0x1f22 with concise DCF data. 15 | Also hearbeat is used and it shows how the master can keep an image of the slave nodes status. 16 | In slaves, hearbeat producer time is set by the master with concise dcf. 17 | 18 | The master binary is launched with the socketcan interface as first argument: 19 | ./master can0 20 | 21 | The slave also has socketcan interface as first argument, but the is a second argument for the node id. 22 | It allows to launch several instance of slave with different node ids. 23 | ./slave can0 1 24 | ./slave can0 2 25 | ./slave can0 3 26 | 27 | The objdict of the master is designed to interact with 3 slaves. 28 | When a slave is started or stopped (with ctrl-c) the masters displays the new slave state. 29 | 30 | Also Master and Slaves are exchanging datas using PDOs 31 | 32 | -------------------------------------------------------------------------------- /examples/linux/dcf/dcfdata.txt: -------------------------------------------------------------------------------- 1 | 2 | [1] 3 | 0x1017 0 2 0xE8 0x03 4 | 5 | [2] 6 | 0x1017 0 2 0xE8 0x03 7 | 8 | [3] 9 | 0x1017 0 2 0xE8 0x03 10 | -------------------------------------------------------------------------------- /examples/linux/dcf/gendcf.h: -------------------------------------------------------------------------------- 1 | 2 | #define DCF_MAX_SIZE 50 3 | #define DEVICE_DICT_NAME "dcfdata.txt" 4 | #define DCF_MAX_NODE_ID 5 5 | 6 | void dcf_data_display(uint8_t dcfdata[][DCF_MAX_SIZE]); 7 | int dcf_read_in_file(char *fileName, uint8_t dcfdata[][DCF_MAX_SIZE]); 8 | -------------------------------------------------------------------------------- /examples/linux/dcf/masterdic.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef MASTERDIC_H 5 | #define MASTERDIC_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 masterdic_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * masterdic_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data masterdic_Data; 15 | extern INTEGER16 position_1; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern INTEGER16 position_2; /* Mapped at index 0x2001, subindex 0x00*/ 17 | extern INTEGER16 position_3; /* Mapped at index 0x2002, subindex 0x00*/ 18 | extern UNS32 counter_1; /* Mapped at index 0x3000, subindex 0x00*/ 19 | extern UNS32 counter_2; /* Mapped at index 0x3001, subindex 0x00*/ 20 | extern UNS32 counter_3; /* Mapped at index 0x3003, subindex 0x00*/ 21 | 22 | #endif // MASTERDIC_H 23 | -------------------------------------------------------------------------------- /examples/linux/dcf/slavedic.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef SLAVEDIC_H 5 | #define SLAVEDIC_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 slavedic_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * slavedic_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data slavedic_Data; 15 | extern UNS32 counter; /* Mapped at index 0x2000, subindex 0x00*/ 16 | extern INTEGER16 position; /* Mapped at index 0x2001, subindex 0x00*/ 17 | 18 | #endif // SLAVEDIC_H 19 | -------------------------------------------------------------------------------- /examples/test_copcican_comedi/insert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | module="test_copcican_comedi" 4 | device="test_copcican_comedi" 5 | mode="664" 6 | 7 | # insert neccessary modules 8 | /sbin/insmod ../../drivers/can_copcican_comedi/can_copcican_comedi.ko 9 | /sbin/insmod ../../src/canfestival.ko 10 | 11 | # insert module with all arguments we got 12 | # and use a pathname, as newer modutils don't look in . by default 13 | /sbin/insmod ./$module.ko $* || exit 1 14 | 15 | # stale nodes and device files are created by COMEDI 16 | 17 | rmmod $module 18 | rmmod canfestival 19 | rmmod can_copcican_comedi 20 | -------------------------------------------------------------------------------- /examples/win32test/win32test.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef WIN32TEST_H 5 | #define WIN32TEST_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 win32test_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * win32test_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data win32test_Data; 15 | 16 | #endif // WIN32TEST_H 17 | -------------------------------------------------------------------------------- /examples/win32test/win32test.od: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /examples/win32test/win32test.vc10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | -------------------------------------------------------------------------------- /include/AT91/Atmel/lib_AT91SAM7X256.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/include/AT91/Atmel/lib_AT91SAM7X256.h -------------------------------------------------------------------------------- /include/AT91/can_AT91.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AT91 Port: Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __CAN_AT91__ 25 | #define __CAN_AT91__ 26 | 27 | #include "config.h" 28 | 29 | // Canfestivals includes 30 | #include "can.h" 31 | 32 | // Number of receive MB 33 | #define NB_MB 8 34 | #define NB_RX_MB 4 35 | // Number of transmit MB 36 | #define NB_TX_MB (NB_MB - NB_RX_MB) 37 | 38 | #if (NB_TX_MB < 1) 39 | #error define less RX MBs, you must have at least 1 TX MB! 40 | #elif (NB_RX_MB < 1) 41 | #error define at least 1 RX MBs! 42 | #endif 43 | 44 | #define START_TX_MB NB_RX_MB 45 | #define TX_INT_MSK ((0xFF << (NB_MB - NB_TX_MB)) & 0xFF) 46 | #define RX_INT_MSK (0xFF >> (NB_MB - NB_RX_MB)) 47 | 48 | /************************* To be called by user app ***************************/ 49 | 50 | unsigned char canInit(unsigned int bitrate); 51 | unsigned char canSend(CAN_PORT notused, Message *m); 52 | unsigned char canReceive(Message *m); 53 | #endif 54 | -------------------------------------------------------------------------------- /include/AT91/canfestival.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AT91 Port: Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | 25 | #ifndef __CAN_CANFESTIVAL__ 26 | #define __CAN_CANFESTIVAL__ 27 | 28 | #include "applicfg.h" 29 | #include "data.h" 30 | #include "objdict.h" 31 | 32 | // --------- to be called by user app --------- 33 | void initTimer(void); 34 | UNS8 canSend(CAN_PORT notused, Message *m); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/AT91/iar.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | Copyright (C): AVR Port Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _IAR_H_ 25 | #define _IAR_H_ 26 | 27 | #ifdef __IAR_SYSTEMS_ICC__ // IAR Compiler 28 | 29 | /* 30 | #define ISR(vect) \ 31 | _Pragma("vector="vect) \ 32 | __interrupt void Interrupt_##vect (void) 33 | */ 34 | #define sei() __enable_interrupt() 35 | #define cli() __disable_interrupt() 36 | #define sleep_enable() SMCR = 1 << SE 37 | #define sleep_cpu() __sleep() 38 | #define wdt_reset() __watchdog_reset() 39 | #define wdt_enable(val) {WDTCSR = 1 << WDCE | 1 << WDE; \ 40 | WDTCSR = 1 << WDE | (val);} 41 | 42 | #else 43 | #error Not an IAR Compiler! 44 | #endif // IAR Compiler 45 | 46 | #endif // _IAR_H_ 47 | -------------------------------------------------------------------------------- /include/AT91/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AT91 Port: Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __TIMERSCFG_H__ 25 | #define __TIMERSCFG_H__ 26 | 27 | // Whatever your microcontroller, the timer wont work if 28 | // TIMEVAL is not at least on 32 bits 29 | #define TIMEVAL UNS32 30 | 31 | // The timer of the AT91 counts from 0000 to 0xFFFF 32 | #define TIMEVAL_MAX 0xFFFF 33 | 34 | // The timer is incrementing every 2.66 us. 35 | #define MS_TO_TIMEVAL(ms) ((ms) * 375) 36 | #define US_TO_TIMEVAL(us) ((us) * 3 / 8) 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/AVR/can_AVR.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AVR Port: Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __CAN_AVR__ 25 | #define __CAN_AVR__ 26 | 27 | // AVR implementation of the CANopen driver includes 28 | // Hardware related macros and ATMEL lib can_drv 29 | #include "config.h" 30 | #include "can_drv.h" 31 | 32 | // Canfestivals includes 33 | #include "can.h" 34 | 35 | // Number of receive MOb 36 | #define NB_RX_MOB 13 // minimal 8 37 | // Number of transmit MOb 38 | #define NB_TX_MOB (NB_MOB - NB_RX_MOB) 39 | 40 | #if (NB_TX_MOB < 1) 41 | #error define less RX Mobs, you must have at least 1 TX MOb! 42 | #elif (NB_RX_MOB < 8) 43 | #error define at least 8 RX MObs! 44 | #endif 45 | 46 | #define START_TX_MOB NB_RX_MOB 47 | #define TX_INT_MSK ((0x7F << (7 - NB_TX_MOB)) & 0x7F) 48 | 49 | /************************* To be called by user app ***************************/ 50 | 51 | unsigned char canInit(unsigned int bitrate); 52 | unsigned char canSend(CAN_PORT notused, Message *m); 53 | unsigned char canReceive(Message *m); 54 | unsigned char canChangeBaudRate_driver( CAN_HANDLE fd, char* baud); 55 | #endif 56 | -------------------------------------------------------------------------------- /include/AVR/canfestival.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AVR Port: Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | 25 | #ifndef __CAN_CANFESTIVAL__ 26 | #define __CAN_CANFESTIVAL__ 27 | 28 | #include "applicfg.h" 29 | #include "data.h" 30 | 31 | // --------- to be called by user app --------- 32 | void initTimer(void); 33 | UNS8 canSend(CAN_PORT notused, Message *m); 34 | UNS8 canChangeBaudRate(CAN_PORT port, char* baud); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/AVR/iar.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | Copyright (C): AVR Port Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _IAR_H_ 25 | #define _IAR_H_ 26 | 27 | #ifdef __IAR_SYSTEMS_ICC__ // IAR Compiler 28 | 29 | /* 30 | #define ISR(vect) \ 31 | _Pragma("vector="vect) \ 32 | __interrupt void Interrupt_##vect (void) 33 | */ 34 | #define sei() __enable_interrupt() 35 | #define cli() __disable_interrupt() 36 | #define sleep_enable() SMCR = 1 << SE 37 | #define sleep_cpu() __sleep() 38 | #define wdt_reset() __watchdog_reset() 39 | #define wdt_enable(val) {WDTCSR = 1 << WDCE | 1 << WDE; \ 40 | WDTCSR = 1 << WDE | (val);} 41 | 42 | #else 43 | #error Not an IAR Compiler! 44 | #endif // IAR Compiler 45 | 46 | #endif // _IAR_H_ 47 | -------------------------------------------------------------------------------- /include/AVR/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AVR Port: Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __TIMERSCFG_H__ 25 | #define __TIMERSCFG_H__ 26 | 27 | // Whatever your microcontroller, the timer wont work if 28 | // TIMEVAL is not at least on 32 bits 29 | #define TIMEVAL UNS32 30 | 31 | // The timer of the AVR counts from 0000 to 0xFFFF in CTC mode (it can be 32 | // shortened setting OCR3A eg. to get 2ms instead of 2.048ms) 33 | #define TIMEVAL_MAX 0xFFFF 34 | 35 | // The timer is incrementing every 4 us. 36 | //#define MS_TO_TIMEVAL(ms) (ms * 250) 37 | //#define US_TO_TIMEVAL(us) (us>>2) 38 | 39 | // The timer is incrementing every 8 us. 40 | #define MS_TO_TIMEVAL(ms) ((ms) * 125) 41 | #define US_TO_TIMEVAL(us) ((us)>>3) 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /include/can.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __can_h__ 24 | #define __can_h__ 25 | 26 | #include "applicfg.h" 27 | 28 | /** 29 | * @brief The CAN message structure 30 | * @ingroup can 31 | */ 32 | typedef struct { 33 | UNS16 cob_id; /**< message's ID */ 34 | UNS8 rtr; /**< remote transmission request. (0 if not rtr message, 1 if rtr message) */ 35 | UNS8 len; /**< message's length (0 to 8) */ 36 | UNS8 data[8]; /**< message's datas */ 37 | } Message; 38 | 39 | #define Message_Initializer {0,0,0,{0,0,0,0,0,0,0,0}} 40 | 41 | typedef UNS8 (*canSend_t)(Message *); 42 | 43 | #endif /* __can_h__ */ 44 | -------------------------------------------------------------------------------- /include/cm0: -------------------------------------------------------------------------------- 1 | cm4/ -------------------------------------------------------------------------------- /include/cm3: -------------------------------------------------------------------------------- 1 | cm4 -------------------------------------------------------------------------------- /include/cm4/canfestival.h: -------------------------------------------------------------------------------- 1 | #include "applicfg.h" 2 | #include "data.h" 3 | 4 | void initTimer(void); 5 | void clearTimer(void); 6 | 7 | unsigned char canSend(CAN_PORT notused, Message *m); 8 | unsigned char canInit(CO_Data * d, uint32_t bitrate); 9 | void canClose(void); 10 | 11 | void disable_it(void); 12 | void enable_it(void); 13 | -------------------------------------------------------------------------------- /include/cm4/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | AVR Port: Andreas GLAUSER and Peter CHRISTEN 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __TIMERSCFG_H__ 25 | #define __TIMERSCFG_H__ 26 | 27 | // Whatever your microcontroller, the timer wont work if 28 | // TIMEVAL is not at least on 32 bits 29 | #define TIMEVAL UNS32 30 | 31 | // using 16 bits timer 32 | #define TIMEVAL_MAX 0xFFFF 33 | 34 | // The timer is incrementing every 10 us. 35 | #define MS_TO_TIMEVAL(ms) ((ms) * 100) 36 | #define US_TO_TIMEVAL(us) ((us) / 10) 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/dcf.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #include "data.h" 23 | 24 | #define DCF_STATUS_INIT 0 25 | #define DCF_STATUS_READ_CHECK 1 26 | #define DCF_STATUS_WRITE 2 27 | #define DCF_STATUS_SAVED 3 28 | #define DCF_STATUS_VERIF_OK 4 29 | 30 | /** 31 | * @brief Init the consise dcf in CO_Data for nodeId 32 | * 33 | * @param *d Pointer on a CAN object data structure 34 | * @param nodeId Id of the slave node 35 | * @return 1: dcf check started 36 | * 0: nothing to do 37 | */ 38 | UNS8 init_consise_dcf(CO_Data* d, UNS8 nodeId); 39 | 40 | /** 41 | * @brief Function to be called from post_SlaveBootup 42 | * for starting the configuration manager 43 | * 44 | * @param *d Pointer on a CAN object data structure 45 | * @param nodeId Id of the slave node 46 | * @return 0: configuration manager busy 47 | * 1: nothing to check, node started 48 | * 2: dcf check started 49 | */ 50 | UNS8 check_and_start_node(CO_Data* d, UNS8 nodeId); 51 | 52 | -------------------------------------------------------------------------------- /include/hcs12/asm-m68hc12/portsaccess.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | Variables to access to the io_ports 24 | */ 25 | 26 | 27 | #ifndef __PORTS_ACCESS__ 28 | #define __PORTS_ACCESS__ 29 | 30 | /* 31 | By default the address is 0X0000 on HCS12. 32 | But the ports can be remaped. See the file ports.h 33 | */ 34 | 35 | 36 | extern volatile unsigned char _io_ports[]; 37 | 38 | /* To use for a 8 bits access */ 39 | #define IO_PORTS_8(adr) \ 40 | _io_ports[adr] 41 | 42 | /* To use for a 16 bits access */ 43 | /* Example : IO_PORTS_16(CAN0IDAR1)= 0xABCD; 44 | will put AB at @CAN0IDAR1 and CD at @CAN0IDAR1 + 1 45 | */ 46 | #define IO_PORTS_16(adr) \ 47 | *((unsigned volatile short*) (_io_ports + (adr))) 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /include/hcs12/board/alire.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/include/hcs12/board/alire.txt -------------------------------------------------------------------------------- /include/hcs12/board/arch/memory.x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/include/hcs12/board/arch/memory.x -------------------------------------------------------------------------------- /include/hcs12/canOpenDriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __CANOPENDRIVER__ 25 | #define __CANOPENDRIVER__ 26 | 27 | 28 | 29 | // --------- to be called by user app --------- 30 | 31 | void initTimer(void); 32 | void resetTimer(void); 33 | void TimerLoop(void); 34 | 35 | /** 36 | Returns 0 if no message received, 0xFF if the receiving stack is not empty. 37 | May be call in polling. 38 | You can also call canDispatch(...) in void __attribute__((interrupt)) can0HdlRcv (void) 39 | (see include/hcs12/canOpenDriver.c) 40 | */ 41 | UNS8 f_can_receive(UNS8 notused, Message *m); 42 | UNS8 canChangeBaudRate_driver( CAN_HANDLE fd, char* baud); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /include/hcs12/error.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __ERROR__ 24 | #define __ERROR__ 25 | 26 | 27 | #define ERR_CAN_ADD_ID_TO_FILTER "1 Not in init mode" 28 | #define ERR_CAN_INIT_CLOCK "4 Not in init mode" 29 | #define ERR_CAN_INIT_1_FILTER "5 Not in init mode" 30 | #define ERR_CAN_INIT_FILTER "6 Not in init mode" 31 | #define ERR_CAN_MSG_TRANSMIT "7 No buffer free " 32 | #define ERR_CAN_SLEEP_MODE "8 Is in init mode" 33 | #define ERR_CAN_SLEEP_MODE_Q "9 Is in init mode" 34 | #define ERR_CAN_SLEEP_WUP_MODE "10 Is in init mode" 35 | #define ERR_CAN0HDLRCV_STACK_FULL "11 Stack R full" 36 | 37 | #endif /* __ERROR__ */ 38 | -------------------------------------------------------------------------------- /include/hcs12/regbase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/include/hcs12/regbase.h -------------------------------------------------------------------------------- /include/nmtSlave.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | /** @defgroup nmtslave NMT Slave 24 | * @brief The NMT Slave methods are called automatically when a NMT message from Master are received. 25 | * @ingroup networkmanagement 26 | */ 27 | 28 | #ifndef __nmtSlave_h__ 29 | #define __nmtSlave_h__ 30 | 31 | #include 32 | #include "data.h" 33 | 34 | /** 35 | * @brief Threat the reception of a NMT message from the master. 36 | * @param *d Pointer to the CAN data structure 37 | * @param *m Pointer to the message received 38 | * @return 39 | * - 0 if OK 40 | * - -1 if the slave is not allowed, by its state, to receive the message 41 | */ 42 | void proceedNMTstateChange (CO_Data* d, Message * m); 43 | 44 | /** 45 | * @brief Transmit the boot-Up frame when the slave is moving from initialization 46 | * state to pre_operational state. 47 | * @param *d Pointer on the CAN data structure 48 | * @return canSend(bus_id,&m) 49 | */ 50 | UNS8 slaveSendBootUp (CO_Data* d); 51 | 52 | 53 | #endif /* __nmtSlave_h__ */ 54 | -------------------------------------------------------------------------------- /include/none/canfestival.h: -------------------------------------------------------------------------------- 1 | #ifndef CANFESTIVAL_H_ 2 | #define CANFESTIVAL_H_ 3 | 4 | #include "timerscfg.h" 5 | #include "can_driver.h" 6 | #include "data.h" 7 | #include "timers_driver.h" 8 | 9 | typedef void* LIB_HANDLE; 10 | 11 | /** @defgroup userapi User API */ 12 | 13 | /** @defgroup can CAN management 14 | * @ingroup userapi 15 | */ 16 | /** 17 | * @ingroup can 18 | * @brief Load CAN driver interface. 19 | * @param *driver_name The location of the library to load 20 | * @return 21 | * - handle of the CAN driver interface is returned upon success. 22 | * - NULL is returned if the CAN driver interface can't be loaded. 23 | */ 24 | #define LoadCanDriver(driver_name) 1 25 | 26 | /** 27 | * @brief Send a CAN message 28 | * @param port CanFestival file descriptor 29 | * @param *m The CAN message to send 30 | * @return 0 if succes 31 | */ 32 | UNS8 canSend(CAN_PORT port, Message *m); 33 | 34 | /** 35 | * @ingroup can 36 | * @brief Open a CANOpen device 37 | * @param *board Pointer to the board structure that contains busname and baudrate 38 | * @param *d Pointer to the CAN object data structure 39 | * @return 40 | * - CanFestival file descriptor is returned upon success. 41 | * - NULL is returned if the CANOpen board can't be opened. 42 | */ 43 | CAN_PORT canOpen(s_BOARD *board, CO_Data * d); 44 | 45 | /** 46 | * @ingroup can 47 | * @brief Close a CANOpen device 48 | * @param *d Pointer to the CAN object data structure 49 | * @return 50 | * - 0 is returned upon success. 51 | * - errorcode if error. (if implemented) 52 | */ 53 | int canClose(CO_Data * d); 54 | 55 | /** 56 | * @ingroup can 57 | * @brief Change the CANOpen device baudrate 58 | * @param port CanFestival file descriptor 59 | * @param *baud The new baudrate to assign 60 | * @return 61 | * - 0 is returned upon success or if not supported by the CAN driver. 62 | * - errorcode from the CAN driver is returned if an error occurs. (if implemented in the CAN driver) 63 | */ 64 | UNS8 canChangeBaudRate(CAN_PORT port, char* baud); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /include/none/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __TIMERSCFG_H__ 24 | #define __TIMERSCFG_H__ 25 | 26 | /* Time unit : ns */ 27 | /* Time resolution : 64bit (~585 years) */ 28 | #define TIMEVAL unsigned long long 29 | #define TIMEVAL_MAX ~(TIMEVAL)0 30 | #define MS_TO_TIMEVAL(ms) ms*1000000L 31 | #define US_TO_TIMEVAL(us) us*1000L 32 | 33 | #define TASK_HANDLE void* 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/sysdep.h: -------------------------------------------------------------------------------- 1 | #ifndef __sysdep_h__ 2 | #define __sysdep_h__ 3 | 4 | #include "config.h" 5 | 6 | #ifdef CANOPEN_BIG_ENDIAN 7 | 8 | /* Warning: the argument must not update pointers, e.g. *p++ */ 9 | 10 | #define UNS16_LE(v) ((((UNS16)(v) & 0xff00) >> 8) | \ 11 | (((UNS16)(v) & 0x00ff) << 8)) 12 | 13 | #define UNS32_LE(v) ((((UNS32)(v) & 0xff000000) >> 24) | \ 14 | (((UNS32)(v) & 0x00ff0000) >> 8) | \ 15 | (((UNS32)(v) & 0x0000ff00) << 8) | \ 16 | (((UNS32)(v) & 0x000000ff) << 24)) 17 | 18 | #else 19 | 20 | #define UNS16_LE(v) (v) 21 | 22 | #define UNS32_LE(v) (v) 23 | 24 | #endif 25 | 26 | #endif /* __sysdep_h__ */ 27 | 28 | -------------------------------------------------------------------------------- /include/timers_kernel/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __TIMERSCFG_H__ 24 | #define __TIMERSCFG_H__ 25 | 26 | #include 27 | #include 28 | 29 | /* Time unit : clock ticks (jiffies) */ 30 | /* Time resolution : ticks per second (architecture-dependent value 'HZ' defined in linux/param.h) */ 31 | 32 | #define TIMEVAL unsigned long 33 | #define TIMEVAL_MAX (~(TIMEVAL)0) >> 1 34 | #define MS_TO_TIMEVAL(ms) ( (ms * HZ) / 1000 ) 35 | #define US_TO_TIMEVAL(us) ( (us * HZ) / 1000000) 36 | 37 | #define TASK_HANDLE struct task_struct* 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/timers_kernel_xeno/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __TIMERSCFG_H__ 24 | #define __TIMERSCFG_H__ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | // Time unit : ns 34 | // Time resolution : 64bit (~584 years) 35 | #define TIMEVAL RTIME 36 | #define TIMEVAL_MAX ~(RTIME)0 37 | #define MS_TO_TIMEVAL(ms) rt_timer_ns2ticks((RTIME)ms*1000000) 38 | #define US_TO_TIMEVAL(us) rt_timer_ns2ticks((RTIME)us*1000) 39 | 40 | #define TASK_HANDLE RT_TASK 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /include/timers_rtai/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __TIMERSCFG_H__ 24 | #define __TIMERSCFG_H__ 25 | 26 | #include 27 | #include 28 | 29 | // Time unit : RTAI's timers count, 64bit signed 30 | #define TIMEVAL RTIME 31 | #define TIMEVAL_MAX ((long long)(~0ULL>>1)) 32 | 33 | #define MS_TO_TIMEVAL(ms) nano2count((RTIME)ms*1000000) 34 | #define US_TO_TIMEVAL(us) nano2count((RTIME)us*1000) 35 | 36 | #define TASK_HANDLE pthread_t 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/timers_unix/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __TIMERSCFG_H__ 24 | #define __TIMERSCFG_H__ 25 | 26 | #include 27 | 28 | /* Time unit : us */ 29 | /* Time resolution : 64bit (~584942 years) */ 30 | #define TIMEVAL unsigned long long 31 | #define TIMEVAL_MAX ~(TIMEVAL)0 32 | #define MS_TO_TIMEVAL(ms) ms*1000L 33 | #define US_TO_TIMEVAL(us) us 34 | 35 | #define TASK_HANDLE pthread_t 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/timers_xeno/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 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 | #ifndef __TIMERSCFG_H__ 24 | #define __TIMERSCFG_H__ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | // Time unit : ns 34 | // Time resolution : 64bit (~584 years) 35 | #define TIMEVAL RTIME 36 | #define TIMEVAL_MAX ~(RTIME)0 37 | #define MS_TO_TIMEVAL(ms) rt_timer_ns2ticks((RTIME)ms*1000000) 38 | #define US_TO_TIMEVAL(us) rt_timer_ns2ticks((RTIME)us*1000) 39 | 40 | #define TASK_HANDLE RT_TASK 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /include/win32/canfestival.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | Win32 Port Leonid Tochinski 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | #ifndef CANFESTIVAL_H_ 24 | #define CANFESTIVAL_H_ 25 | 26 | #include "timerscfg.h" 27 | #include "can_driver.h" 28 | #include "data.h" 29 | #include "timers_driver.h" 30 | 31 | #include 32 | typedef HINSTANCE LIB_HANDLE; 33 | 34 | UNS8 UnLoadCanDriver(LIB_HANDLE handle); 35 | LIB_HANDLE LoadCanDriver(LPCSTR driver_name); 36 | UNS8 canSend(CAN_PORT port, Message *m); 37 | CAN_PORT canOpen(s_BOARD *board, CO_Data * d); 38 | int canClose(CO_Data * d); 39 | UNS8 canChangeBaudRate(CAN_PORT port, char* baud); 40 | 41 | #endif /*CANFESTIVAL_H_*/ 42 | -------------------------------------------------------------------------------- /include/win32/timerscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of CanFestival, a library implementing CanOpen Stack. 3 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN 5 | Win32 port by Leonid Tochinski 6 | 7 | See COPYING file for copyrights details. 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __TIMERSCFG_H__ 25 | #define __TIMERSCFG_H__ 26 | 27 | #include 28 | 29 | // Time unit : 1msec 30 | #define TIMEVAL DWORD 31 | #define TIMEVAL_MAX ~(TIMEVAL)0 32 | 33 | #define MS_TO_TIMEVAL(ms) ms 34 | #define US_TO_TIMEVAL(us) (us / 1000) 35 | 36 | #define TASK_HANDLE HANDLE 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /objdictgen/Gnosis_Utils-current.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/Gnosis_Utils-current.tar.gz -------------------------------------------------------------------------------- /objdictgen/Makefile.in: -------------------------------------------------------------------------------- 1 | #! gmake 2 | 3 | # 4 | # Copyright (C) 2006 Laurent Bessard 5 | # 6 | # This file is part of canfestival, a library implementing the canopen 7 | # stack 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | 24 | PREFIX = SUB_PREFIX 25 | 26 | all: gnosis 27 | 28 | gnosis: gnosis/version.py 29 | 30 | gnosis/version.py: 31 | #wget http://gnosis.cx/download/Gnosis_Utils-current.tar.gz 32 | mkdir -p gnosis_extract 33 | tar xzof Gnosis_Utils-current.tar.gz -C gnosis_extract 34 | mv gnosis_extract/Gnosis_Utils-*/gnosis . 35 | rm -rf gnosis_extract 36 | 37 | install: gnosis 38 | mkdir -p $(PREFIX)/objdictgen 39 | cp -r *.py* config doc doc_index locale examples gnosis *.ico $(PREFIX)/objdictgen 40 | chmod -R a+r $(PREFIX)/objdictgen 41 | mkdir -p $(PREFIX)/bin 42 | ln -sf $(PREFIX)/objdictgen/objdictedit.py $(PREFIX)/bin/objdictedit 43 | chmod 755 $(PREFIX)/objdictgen/objdictedit.py 44 | ln -sf $(PREFIX)/objdictgen/objdictgen.py $(PREFIX)/bin/objdictgen 45 | chmod 755 $(PREFIX)/objdictgen/objdictgen.py 46 | 47 | uninstall: 48 | rm -rf $(PREFIX)/objdictgen 49 | rm -f $(PREFIX)/bin/objdictedit 50 | rm -f $(PREFIX)/bin/objdictgen 51 | 52 | clean: 53 | 54 | mrproper: clean 55 | rm -f Gnosis_Utils-current.tar.gz 56 | rm -rf gnosis 57 | 58 | 59 | -------------------------------------------------------------------------------- /objdictgen/canfestival_config.py.in: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2006 Laurent Bessard 3 | # 4 | # This file is part of canfestival, a library implementing the canopen 5 | # stack 6 | # 7 | # This library is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU Lesser General Public 9 | # License as published by the Free Software Foundation; either 10 | # version 2.1 of the License, or (at your option) any later version. 11 | # 12 | # This library is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | # Lesser General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Lesser General Public 18 | # License along with this library; if not, write to the Free Software 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | # 21 | from os.path import join as opj 22 | 23 | CC = "SUB_CC" 24 | PROG_CFLAGS = "SUB_PROG_CFLAGS" 25 | EXE_CFLAGS = "SUB_EXE_CFLAGS" 26 | OS_NAME = "SUB_OS_NAME" 27 | ARCH_NAME = "SUB_ARCH_NAME" 28 | PREFIX = "SUB_PREFIX" 29 | TARGET = "SUB_TARGET" 30 | CAN_DRIVER = "SUB_CAN_DRIVER" 31 | TIMERS_DRIVER = "SUB_TIMERS_DRIVER" 32 | 33 | 34 | def getCFLAGS(Cpth): 35 | ipth = opj(Cpth, "include") 36 | return PROG_CFLAGS + ' -I"' + ipth + '" -I"' + opj(ipth, TARGET) + '" -I"' + opj(ipth, CAN_DRIVER) + '" -I"' + opj(ipth,TIMERS_DRIVER) + '"' 37 | 38 | def getLDFLAGS(Cpth): 39 | return EXE_CFLAGS + ' "' + opj(Cpth,"src","libcanfestival.a") + '" "' + opj(Cpth,"drivers", TARGET, "libcanfestival_%s.a"%TARGET)+ '"' 40 | 41 | # herafter is appended DLL_LIST declaration 42 | 43 | -------------------------------------------------------------------------------- /objdictgen/config/DS-419.prf: -------------------------------------------------------------------------------- 1 | global Mapping, AddMenuEntries 2 | 3 | """ 4 | MappingDictionary for DS-419 5 | """ 6 | 7 | Mapping = { 8 | 0x6000 : {"name" : "Battery status", "struct" : var, "need" : True, "values" : 9 | [{"name" : "battery_status", "type" : 0x05, "access" : 'rw', "pdo" : True}]}, 10 | 11 | 0x6001 : {"name" : "Charger status", "struct" : var, "need" : True, "values" : 12 | [{"name" : "charger_status", "type" : 0x06, "access" : 'rw', "pdo" : True}]}, 13 | 14 | 0x6052 : {"name" : "Ah returned during last charge", "struct" : var, "need" : False, "values" : 15 | [{"name" : "ah_returned_during_last_charge", "type" : 0x06, "access" : 'ro', "pdo" : True}]}, 16 | 17 | 0x6060 : {"name" : "Battery voltage", "struct" : var, "need" : False, "values" : 18 | [{"name" : "battery_voltage", "type" : 0x07, "access" : 'rw', "pdo" : True}]}, 19 | 20 | 0x6070 : {"name" : "Charge current requested", "struct" : var, "need" : False, "values" : 21 | [{"name" : "charge_current_requested", "type" : 0x06, "access" : 'rw', "pdo" : True}]}, 22 | 23 | 0x6080 : {"name" : "Charger state of charge", "struct" : var, "need" : False, "values" : 24 | [{"name" : "charge_state_of_charge", "type" : 0x05, "access" : 'ro', "pdo" : True}]}, 25 | 26 | 0x6081 : {"name" : "Battery state of charge", "struct" : var, "need" : False, "values" : 27 | [{"name" : "battery_state_of_charge", "type" : 0x05, "access" : 'rw', "pdo" : True}]} 28 | 29 | } 30 | 31 | AddMenuEntries = [] 32 | -------------------------------------------------------------------------------- /objdictgen/doc/301_v04000201.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/doc/301_v04000201.pdf -------------------------------------------------------------------------------- /objdictgen/doc/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |

6 | CanFestival is an OpenSource (LGPL) CANOpen framework. 7 |

8 | http://canfestival.sourceforge.net 9 |

10 | Copyright �: Edouard TISSERANT, Francis DUPIN and Laurent BESSARD 11 |

12 | Version: CAN Festival 3.0 13 |

14 | 15 | 16 | 19 | 23 | 24 | 25 | 28 | 29 |
17 | Contributor : 18 | 20 | LIVIC
21 | http://www.inrets.fr/ur/livic 22 |
26 | Supported by : 27 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /objdictgen/doc/canfestival.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/doc/canfestival.gif -------------------------------------------------------------------------------- /objdictgen/doc/manual_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/doc/manual_en.pdf -------------------------------------------------------------------------------- /objdictgen/doc_index/__init__.py: -------------------------------------------------------------------------------- 1 | # Package initialisation 2 | 3 | from DS301_index import * 4 | -------------------------------------------------------------------------------- /objdictgen/examples/example_objdict.h: -------------------------------------------------------------------------------- 1 | 2 | /* File generated by gen_cfile.py. Should not be modified. */ 3 | 4 | #ifndef EXAMPLE_OBJDICT_H 5 | #define EXAMPLE_OBJDICT_H 6 | 7 | #include "data.h" 8 | 9 | /* Prototypes of function provided by object dictionnary */ 10 | UNS32 example_objdict_valueRangeTest (UNS8 typeValue, void * value); 11 | const indextable * example_objdict_scanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 * errorCode); 12 | 13 | /* Master node data struct */ 14 | extern CO_Data example_objdict_Data; 15 | extern UNS8 Time_seconds; /* Mapped at index 0x2000, subindex 0x01 */ 16 | extern UNS8 Time_minutes; /* Mapped at index 0x2000, subindex 0x02 */ 17 | extern UNS8 Time_hours; /* Mapped at index 0x2000, subindex 0x03 */ 18 | extern UNS8 Time_days; /* Mapped at index 0x2000, subindex 0x04 */ 19 | extern UNS32 canopenErrNB; /* Mapped at index 0x2001, subindex 0x00*/ 20 | extern UNS32 canopenErrVal; /* Mapped at index 0x2002, subindex 0x00*/ 21 | extern UNS8 strTest[10]; /* Mapped at index 0x2003, subindex 0x00*/ 22 | 23 | #endif // EXAMPLE_OBJDICT_H 24 | -------------------------------------------------------------------------------- /objdictgen/i18n/README: -------------------------------------------------------------------------------- 1 | To generate message.pot file: 2 | 3 | python mki18n.py -p --domain=objdictgen 4 | 5 | To generate .mo files for all languages: 6 | 7 | python mki18n.py -m --moTarget=../locale --domain=objdictgen 8 | -------------------------------------------------------------------------------- /objdictgen/i18n/app.fil: -------------------------------------------------------------------------------- 1 | ../commondialogs.py 2 | ../eds_utils.py 3 | ../gen_cfile.py 4 | ../networkedit.py 5 | ../nodelist.py 6 | ../nodemanager.py 7 | ../objdictedit.py 8 | ../objdictgen.py 9 | ../subindextable.py 10 | -------------------------------------------------------------------------------- /objdictgen/locale/fr_FR/LC_MESSAGES/objdictgen.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/locale/fr_FR/LC_MESSAGES/objdictgen.mo -------------------------------------------------------------------------------- /objdictgen/locale/zh_CN/LC_MESSAGES/objdictgen.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/locale/zh_CN/LC_MESSAGES/objdictgen.mo -------------------------------------------------------------------------------- /objdictgen/networkedit.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/networkedit.ico -------------------------------------------------------------------------------- /objdictgen/networkedit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fbsder/canfestival/6a46da8114f34fbd21a6154ef778be0a6b012aec/objdictgen/networkedit.png --------------------------------------------------------------------------------