From: <jac...@us...> - 2013-02-18 21:30:28
|
Revision: 3008 http://openlcb.svn.sourceforge.net/openlcb/?rev=3008&view=rev Author: jacobsen Date: 2013-02-18 21:30:20 +0000 (Mon, 18 Feb 2013) Log Message: ----------- clang changes Modified Paths: -------------- trunk/prototypes/C/libraries/OlcbCommonCAN/Configuration.h trunk/prototypes/C/libraries/OlcbCommonCAN/README trunk/prototypes/C/libraries/OlcbTestCAN/Makefile trunk/prototypes/C/libraries/OlcbTestCAN/test/ConfigurationTest.cpp trunk/prototypes/C/libraries/OlcbTestCAN/test/pyOlcbBasicNode.cpp trunk/prototypes/C/libraries/OlcbTestCAN/test/pyRIo.cpp Modified: trunk/prototypes/C/libraries/OlcbCommonCAN/Configuration.h =================================================================== --- trunk/prototypes/C/libraries/OlcbCommonCAN/Configuration.h 2013-02-18 20:39:34 UTC (rev 3007) +++ trunk/prototypes/C/libraries/OlcbCommonCAN/Configuration.h 2013-02-18 21:30:20 UTC (rev 3008) @@ -54,7 +54,7 @@ }; -// optional members +// optional members, 0 if not appearing; does this work with clang compiler? extern "C" { uint32_t spaceUpperAddr(uint8_t space) __attribute__((weak)); }; Modified: trunk/prototypes/C/libraries/OlcbCommonCAN/README =================================================================== --- trunk/prototypes/C/libraries/OlcbCommonCAN/README 2013-02-18 20:39:34 UTC (rev 3007) +++ trunk/prototypes/C/libraries/OlcbCommonCAN/README 2013-02-18 21:30:20 UTC (rev 3008) @@ -1,2 +1,14 @@ This software is part of the OpenLCB project and is copyrighted by the authors. Use is governed by a license. + +This is the common part of the OpenLCB implementation commonly +called "OlcbLib". + +It can be used in several ways: +1) Via the Arduino IDE +2) Using an internal Makefile +3) As a NetBeans library project + +The OlcbArduinoCAN library provides specific +implementations for use with the Arduino IDE +and CAN libraries. Modified: trunk/prototypes/C/libraries/OlcbTestCAN/Makefile =================================================================== --- trunk/prototypes/C/libraries/OlcbTestCAN/Makefile 2013-02-18 20:39:34 UTC (rev 3007) +++ trunk/prototypes/C/libraries/OlcbTestCAN/Makefile 2013-02-18 21:30:20 UTC (rev 3008) @@ -1,7 +1,7 @@ TOPDIR := $(PWD) OBJDIR := $(TOPDIR)/obj -CPPFLAGS := -I$(PWD)/../OlcbCommonCAN -I$(PWD)/scaffold $(CPPFLAGS) -I$(PWD)/../OlcbArduinoCAN +CPPFLAGS := -I$(PWD)/../OlcbCommonCAN -I$(PWD)/scaffold $(CPPFLAGS) -I$(PWD)/../OlcbArduinoCAN -DRAMEND=0x0200 SUBDIRS = scaffold ../OlcbCommonCAN test Modified: trunk/prototypes/C/libraries/OlcbTestCAN/test/ConfigurationTest.cpp =================================================================== --- trunk/prototypes/C/libraries/OlcbTestCAN/test/ConfigurationTest.cpp 2013-02-18 20:39:34 UTC (rev 3007) +++ trunk/prototypes/C/libraries/OlcbTestCAN/test/ConfigurationTest.cpp 2013-02-18 21:30:20 UTC (rev 3008) @@ -43,6 +43,17 @@ unsigned int datagramCallback(uint8_t rbuf[DATAGRAM_LENGTH], unsigned int length, unsigned int from); unsigned int rcvCallback(uint8_t *rbuf, unsigned int length); +extern "C" { + uint32_t spaceUpperAddr(uint8_t space) { // return last valid address + switch (space) { + case 255: return 0x100; // CDI (data starts at zero) + case 254: return RAMEND; // RAM from Arduino definition + case 253: return 0x300; // Configuration + } + return (uint32_t)3; + } +}; + /** * Get and put routines that * use a test memory space. Modified: trunk/prototypes/C/libraries/OlcbTestCAN/test/pyOlcbBasicNode.cpp =================================================================== --- trunk/prototypes/C/libraries/OlcbTestCAN/test/pyOlcbBasicNode.cpp 2013-02-18 20:39:34 UTC (rev 3007) +++ trunk/prototypes/C/libraries/OlcbTestCAN/test/pyOlcbBasicNode.cpp 2013-02-18 21:30:20 UTC (rev 3008) @@ -213,7 +213,7 @@ return p - bufptr - 1; } -main() +int main() { // get start buffer Modified: trunk/prototypes/C/libraries/OlcbTestCAN/test/pyRIo.cpp =================================================================== --- trunk/prototypes/C/libraries/OlcbTestCAN/test/pyRIo.cpp 2013-02-18 20:39:34 UTC (rev 3007) +++ trunk/prototypes/C/libraries/OlcbTestCAN/test/pyRIo.cpp 2013-02-18 21:30:20 UTC (rev 3008) @@ -209,7 +209,7 @@ return p - bufptr - 1; } -main() +int main() { // get start buffer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |