]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - znp-host-framework/znp-host-framework.git/commitdiff
Removed win platform
authorHector Ramos <h-ramos@ti.com>
Thu, 18 Dec 2014 22:06:30 +0000 (14:06 -0800)
committerHector Ramos <h-ramos@ti.com>
Thu, 18 Dec 2014 22:06:30 +0000 (14:06 -0800)
28 files changed:
examples/cmdLine/build/windows/Makefile [deleted file]
examples/cmdLine/build/windows/cmdLineBuild/cmdLineBuild.cbp [deleted file]
examples/cmdLine/build/windows/cmdLineBuild/cmdLineBuild.layout [deleted file]
examples/cmdLine/build/windows/main.c [deleted file]
examples/dataSendRcv/build/windows/Makefile [deleted file]
examples/dataSendRcv/build/windows/dataSendRcvBuild/dataSendRcvBuild.cbp [deleted file]
examples/dataSendRcv/build/windows/dataSendRcvBuild/dataSendRcvBuild.layout [deleted file]
examples/dataSendRcv/build/windows/main.c [deleted file]
examples/nwkTopology/build/windows/Makefile [deleted file]
examples/nwkTopology/build/windows/main.c [deleted file]
examples/nwkTopology/build/windows/nwkTopologyBuild/nwkTopologyBuild.cbp [deleted file]
examples/nwkTopology/build/windows/nwkTopologyBuild/nwkTopologyBuild.layout [deleted file]
examples/servDisc/build/windows/Makefile [deleted file]
examples/servDisc/build/windows/main.c [deleted file]
examples/servDisc/build/windows/servDiscBuild/servDiscBuild.cbp [deleted file]
examples/servDisc/build/windows/servDiscBuild/servDiscBuild.layout [deleted file]
framework/platform/windows/dbgPrint.c [deleted file]
framework/platform/windows/dbgPrint.h [deleted file]
framework/platform/windows/hostConsole.c [deleted file]
framework/platform/windows/hostConsole.h [deleted file]
framework/platform/windows/queue.c [deleted file]
framework/platform/windows/queue.h [deleted file]
framework/platform/windows/rpcTransport.c [deleted file]
framework/platform/windows/rpcTransport.h [deleted file]
framework/platform/windows/semaphore.c [deleted file]
framework/platform/windows/semaphore.h [deleted file]
framework/rpcWindows/rpc.c [deleted file]
framework/rpcWindows/rpc.h [deleted file]

diff --git a/examples/cmdLine/build/windows/Makefile b/examples/cmdLine/build/windows/Makefile
deleted file mode 100644 (file)
index 95c58e0..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-
-SBU_REV= "0.1"
-
-
-INCLUDE = -I$(PROJ_DIR)..\.. -I$(PROJ_DIR)..\..\..\..\framework\platform\windows -I$(PROJ_DIR)..\..\..\..\framework\rpcWindows -I$(PROJ_DIR)..\..\..\..\framework\mt -I$(PROJ_DIR)..\..\..\..\framework\mt\Af -I$(PROJ_DIR)..\..\..\..\framework\mt\Zdo -I$(PROJ_DIR)..\..\..\..\framework\mt\Sys -I$(PROJ_DIR)..\..\..\..\framework\mt\Sapi
-
-CC= gcc.exe
-#CC=\usr\local\angstrom\arm\bin\arm-angstrom-linux-gnueabi-gcc
-
-CFLAGS= -Wall -g -Wall  -c
-LIBS =
-DEFS += -D_OBJC_NO_COM
-PROJ_DIR=
-
-Debug: cmdLine.exe
-
-cmdLine.exe: main.o cmdLine.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-       $(CC) $(LIBS) -o cmdLine.exe main.o cmdLine.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-
-# rule for file "main.o".
-main.o: $(PROJ_DIR)main.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)main.c
-
-# rule for file "cmdLine.o".
-cmdLine.o: $(PROJ_DIR)..\..\cmdLine.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\cmdLine.c\r
-\r
-# rule for file "rpcTransport.o".
-queue.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c\r
-\r
-# rule for file "rpcTransport.o".
-semaphore.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-
-# rule for file "rpc.o".
-rpc.o: $(PROJ_DIR)..\..\..\..\framework\rpc\rpc.h $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-
-# rule for file "mtParser.o".
-mtParser.o: $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.h $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-
-# rule for file "mtZdo.o".
-mtZdo.o: $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.h $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-
-# rule for file "mtSys.o".
-mtSys.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.h $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-
-# rule for file "mtAf.o".
-mtAf.o: $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.h $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-
-# rule for file "mtSapi.o".
-mtSapi.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.h $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-
-# rule for file "dbgPrint.o".
-dbgPrint.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-
-# rule for file "hostConsole.o".
-hostConsole.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-
-
-\r
-
-\r
-# rule for file "rpcTransport.o".
-rpcTransport.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c\r
-
-# rule for cleaning files generated during compilations.
-cleanDebug:
-       -del cmdLine.exe *.o\r
-       echo Clean done
diff --git a/examples/cmdLine/build/windows/cmdLineBuild/cmdLineBuild.cbp b/examples/cmdLine/build/windows/cmdLineBuild/cmdLineBuild.cbp
deleted file mode 100644 (file)
index 9295c42..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
-       <FileVersion major="1" minor="6" />
-       <Project>
-               <Option title="cmdLineBuild" />
-               <Option makefile_is_custom="1" />
-               <Option execution_dir="../../windows" />
-               <Option pch_mode="2" />
-               <Option compiler="gcc" />
-               <Build>
-                       <Target title="Debug">
-                               <Option output="bin/Debug/cmdLineBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Debug/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Option projectIncludeDirsRelation="2" />
-                               <Option projectResourceIncludeDirsRelation="2" />
-                               <Option projectLibDirsRelation="2" />
-                               <Compiler>
-                                       <Add option="-g" />
-                                       <Add directory="../../../../../framework/rpcWindows" />
-                                       <Add directory="../../../../../framework/mt/Af" />
-                                       <Add directory="../../../../cmdLine" />
-                                       <Add directory="../../../../../framework/mt" />
-                                       <Add directory="../../../../../framework/mt/Sapi" />
-                                       <Add directory="../../../../../framework/mt/Zdo" />
-                                       <Add directory="../../../../../framework/mt/Sys" />
-                                       <Add directory="../../../../../framework/platform/windows" />
-                               </Compiler>
-                               <ResourceCompiler>
-                                       <Add directory="../../../../../framework/rpcWindows" />
-                                       <Add directory="../../../../cmdLine" />
-                                       <Add directory="../../../../../framework/mt" />
-                                       <Add directory="../../../../../framework/mt/Af" />
-                                       <Add directory="../../../../../framework/mt/Sapi" />
-                                       <Add directory="../../../../../framework/mt/Zdo" />
-                                       <Add directory="../../../../../framework/mt/Sys" />
-                                       <Add directory="../../../../../framework/platform/windows" />
-                               </ResourceCompiler>
-                               <Linker>
-                                       <Add directory="../../../../../framework/rpcWindows" />
-                                       <Add directory="../../../../../framework/mt/Af" />
-                                       <Add directory="../../../../cmdLine" />
-                                       <Add directory="../../../../../framework/mt" />
-                                       <Add directory="../../../../../framework/mt/Sapi" />
-                                       <Add directory="../../../../../framework/mt/Zdo" />
-                                       <Add directory="../../../../../framework/mt/Sys" />
-                                       <Add directory="../../../../../framework/platform/windows" />
-                               </Linker>
-                       </Target>
-                       <Target title="Release">
-                               <Option output="bin/Release/cmdLineBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Release/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-O2" />
-                                       <Add directory="../../../../../framework/mt/Af" />
-                                       <Add directory="../../../../cmdLine" />
-                                       <Add directory="../../../../../framework/mt" />
-                                       <Add directory="../../../../../framework/mt/Sapi" />
-                                       <Add directory="../../../../../framework/mt/Zdo" />
-                                       <Add directory="../../../../../framework/mt/Sys" />
-                                       <Add directory="../../../../../framework/rpcWindows" />
-                                       <Add directory="../../../../../framework/platform/windows" />
-                               </Compiler>
-                               <ResourceCompiler>
-                                       <Add directory="../../../../cmdLine" />
-                                       <Add directory="../../../../../framework/mt" />
-                                       <Add directory="../../../../../framework/mt/Af" />
-                                       <Add directory="../../../../../framework/mt/Sapi" />
-                                       <Add directory="../../../../../framework/mt/Zdo" />
-                                       <Add directory="../../../../../framework/mt/Sys" />
-                                       <Add directory="../../../../../framework/rpcWindows" />
-                                       <Add directory="../../../../../framework/platform/windows" />
-                               </ResourceCompiler>
-                               <Linker>
-                                       <Add option="-s" />
-                                       <Add directory="../../../../../framework/mt/Af" />
-                                       <Add directory="../../../../cmdLine" />
-                                       <Add directory="../../../../../framework/mt" />
-                                       <Add directory="../../../../../framework/mt/Sapi" />
-                                       <Add directory="../../../../../framework/mt/Zdo" />
-                                       <Add directory="../../../../../framework/mt/Sys" />
-                                       <Add directory="../../../../../framework/rpcWindows" />
-                                       <Add directory="../../../../../framework/platform/windows" />
-                               </Linker>
-                       </Target>
-               </Build>
-               <Compiler>
-                       <Add option="-Wall" />
-                       <Add directory="../../../../../framework/rpcWindows" />
-                       <Add directory="../../../../cmdLine" />
-                       <Add directory="../../../../../framework/mt" />
-                       <Add directory="../../../../../framework/mt/Af" />
-                       <Add directory="../../../../../framework/mt/Sapi" />
-                       <Add directory="../../../../../framework/mt/Zdo" />
-                       <Add directory="../../../../../framework/mt/Sys" />
-                       <Add directory="../../../../../framework/platform/windows" />
-               </Compiler>
-               <ResourceCompiler>
-                       <Add directory="../../../../../framework/rpcWindows" />
-                       <Add directory="../../../../cmdLine" />
-                       <Add directory="../../../../../framework/mt" />
-                       <Add directory="../../../../../framework/mt/Af" />
-                       <Add directory="../../../../../framework/mt/Sapi" />
-                       <Add directory="../../../../../framework/mt/Zdo" />
-                       <Add directory="../../../../../framework/mt/Sys" />
-                       <Add directory="../../../../../framework/platform/windows" />
-               </ResourceCompiler>
-               <Linker>
-                       <Add directory="../../../../../framework/rpcWindows" />
-                       <Add directory="../../../../../framework/mt/Af" />
-                       <Add directory="../../../../cmdLine" />
-                       <Add directory="../../../../../framework/mt" />
-                       <Add directory="../../../../../framework/mt/Sapi" />
-                       <Add directory="../../../../../framework/mt/Zdo" />
-                       <Add directory="../../../../../framework/mt/Sys" />
-                       <Add directory="../../../../../framework/platform/windows" />
-               </Linker>
-               <Unit filename="../main.c">
-                       <Option compilerVar="CC" />
-               </Unit>
-               <Extensions>
-                       <code_completion />
-                       <envvars />
-                       <debugger />
-               </Extensions>
-       </Project>
-</CodeBlocks_project_file>
diff --git a/examples/cmdLine/build/windows/cmdLineBuild/cmdLineBuild.layout b/examples/cmdLine/build/windows/cmdLineBuild/cmdLineBuild.layout
deleted file mode 100644 (file)
index 7efa686..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
-       <ActiveTarget name="Debug" />
-       <File name="..\main.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
-               <Cursor>
-                       <Cursor1 position="2575" topLine="83" />
-               </Cursor>
-       </File>
-</CodeBlocks_layout_file>
diff --git a/examples/cmdLine/build/windows/main.c b/examples/cmdLine/build/windows/main.c
deleted file mode 100644 (file)
index 04240b1..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/**************************************************************************************************\r
- * Filename:       main.c\r
- * Description:    This file contains the main for the gnu platform.\r
- *\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <process.h>\r
-#include "rpc.h"\r
-#include "cmdLine.h"\r
-\r
-#include "dbgPrint.h"\r
-\r
-void *rpcTask(void *argument)\r
-{\r
-  while(1)\r
-  {\r
-       rpcProcess();\r
-  }\r
-\r
-  dbg_print(PRINT_LEVEL_WARNING, "rpcTask exited!\n");\r
-}\r
-\r
-void *appTask(void *argument)\r
-{\r
-  while(1)\r
-  {\r
-               appProcess(NULL);\r
-  }\r
-}
-
-\r
-\r
-int main(int argc, char* argv[])\r
-{\r
-    //int retval = 0;\r
-    char * selected_serial_port;\r
-    int param = 0;\r
-    int * pparam = &param;\r
-\r
-    dbg_print(PRINT_LEVEL_INFO, "%s -- %s %s\n", argv[0], __DATE__, __TIME__);\r
-\r
-    // accept only 1\r
-    if (argc < 2) {\r
-        usage(argv[0]);\r
-        dbg_print(PRINT_LEVEL_INFO, "attempting to use COM6\n\n");\r
-        selected_serial_port = "COM10";\r
-    } else {\r
-        selected_serial_port = argv[1];\r
-\r
-    }\r
-\r
-    int serialPortFd = rpcOpen(selected_serial_port, 0);\r
-    if (serialPortFd == -1) {\r
-               dbg_print(PRINT_LEVEL_ERROR, "could not open serial port\n");\r
-        exit(-1);\r
-    }\r
-\r
-\r
-    //init the application thread to register the callbacks\r
-    rpcInitMq();\r
-\r
-    appInit();\r
-    //Start the Rx thread\r
-    dbg_print(PRINT_LEVEL_INFO, "creating RPC thread\n");\r
-   _beginthread( rpcTask, 0, (void *) pparam );\r
-    param++;\r
-\r
-    //Start the example thread\r
-    dbg_print(PRINT_LEVEL_INFO, "creating example thread\n");\r
-    _beginthread( appTask, 0, (void *) pparam );\r
-    param++;\r
-    while(1);\r
-\r
-}\r
diff --git a/examples/dataSendRcv/build/windows/Makefile b/examples/dataSendRcv/build/windows/Makefile
deleted file mode 100644 (file)
index 64af2e2..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-
-SBU_REV= "0.1"
-
-
-INCLUDE = -I$(PROJ_DIR)..\.. -I$(PROJ_DIR)..\..\..\..\framework\platform\windows -I$(PROJ_DIR)..\..\..\..\framework\rpcWindows -I$(PROJ_DIR)..\..\..\..\framework\mt -I$(PROJ_DIR)..\..\..\..\framework\mt\Af -I$(PROJ_DIR)..\..\..\..\framework\mt\Zdo -I$(PROJ_DIR)..\..\..\..\framework\mt\Sys -I$(PROJ_DIR)..\..\..\..\framework\mt\Sapi
-
-CC= gcc.exe
-#CC=\usr\local\angstrom\arm\bin\arm-angstrom-linux-gnueabi-gcc
-
-CFLAGS= -Wall -g -Wall  -c
-LIBS =
-DEFS += -D_OBJC_NO_COM
-PROJ_DIR=
-
-Debug: dataSendRcv.exe
-
-dataSendRcv.exe: main.o dataSendRcv.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-       $(CC) $(LIBS) -o dataSendRcv.exe main.o dataSendRcv.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-
-# rule for file "main.o".
-main.o: $(PROJ_DIR)main.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)main.c
-
-# rule for file "dataSendRcv.o".
-dataSendRcv.o: $(PROJ_DIR)..\..\dataSendRcv.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\dataSendRcv.c\r
-\r
-# rule for file "rpcTransport.o".
-queue.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c\r
-\r
-# rule for file "rpcTransport.o".
-semaphore.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-
-# rule for file "rpc.o".
-rpc.o: $(PROJ_DIR)..\..\..\..\framework\rpc\rpc.h $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-
-# rule for file "mtParser.o".
-mtParser.o: $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.h $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-
-# rule for file "mtZdo.o".
-mtZdo.o: $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.h $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-
-# rule for file "mtSys.o".
-mtSys.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.h $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-
-# rule for file "mtAf.o".
-mtAf.o: $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.h $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-
-# rule for file "mtSapi.o".
-mtSapi.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.h $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-
-# rule for file "dbgPrint.o".
-dbgPrint.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-
-# rule for file "hostConsole.o".
-hostConsole.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-
-
-\r
-
-\r
-# rule for file "rpcTransport.o".
-rpcTransport.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c\r
-
-# rule for cleaning files generated during compilations.
-cleanDebug:
-       -del dataSendRcv.exe *.o\r
-       echo Clean done
diff --git a/examples/dataSendRcv/build/windows/dataSendRcvBuild/dataSendRcvBuild.cbp b/examples/dataSendRcv/build/windows/dataSendRcvBuild/dataSendRcvBuild.cbp
deleted file mode 100644 (file)
index 28c1994..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
-       <FileVersion major="1" minor="6" />
-       <Project>
-               <Option title="dataSendRcvBuild" />
-               <Option makefile_is_custom="1" />
-               <Option execution_dir="../../windows" />
-               <Option pch_mode="2" />
-               <Option compiler="gcc" />
-               <Build>
-                       <Target title="Debug">
-                               <Option output="bin/Debug/dataSendRcvBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Debug/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-g" />
-                               </Compiler>
-                       </Target>
-                       <Target title="Release">
-                               <Option output="bin/Release/dataSendRcvBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Release/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-O2" />
-                               </Compiler>
-                               <Linker>
-                                       <Add option="-s" />
-                               </Linker>
-                       </Target>
-               </Build>
-               <Compiler>
-                       <Add option="-Wall" />
-               </Compiler>
-               <Extensions>
-                       <code_completion />
-                       <envvars />
-                       <debugger />
-                       <lib_finder disable_auto="1" />
-               </Extensions>
-       </Project>
-</CodeBlocks_project_file>
diff --git a/examples/dataSendRcv/build/windows/dataSendRcvBuild/dataSendRcvBuild.layout b/examples/dataSendRcv/build/windows/dataSendRcvBuild/dataSendRcvBuild.layout
deleted file mode 100644 (file)
index 1053280..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
-       <ActiveTarget name="Debug" />
-</CodeBlocks_layout_file>
diff --git a/examples/dataSendRcv/build/windows/main.c b/examples/dataSendRcv/build/windows/main.c
deleted file mode 100644 (file)
index d6f5ce3..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/**************************************************************************************************\r
- * Filename:       main.c\r
- * Description:    This file contains the main for the gnu platform.\r
- *\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <process.h>\r
-\r
-#include "rpc.h"\r
-\r
-#include "dataSendRcv.h"\r
-\r
-#include "dbgPrint.h"\r
-\r
-void *rpcTask(void *argument)\r
-{\r
-       while (1)\r
-       {\r
-               rpcProcess();\r
-       }\r
-\r
-       dbg_print(PRINT_LEVEL_WARNING, "rpcTask exited!\n");\r
-}\r
-\r
-void *appTask(void *argument)\r
-{\r
-       while (1)\r
-       {\r
-               appProcess(NULL);\r
-       }\r
-}\r
-\r
-void *appInMessage(void *argument)\r
-{\r
-\r
-       while (1)\r
-       {\r
-               appInLoop(NULL);\r
-       }\r
-}\r
-\r
-int main(int argc, char* argv[])\r
-{\r
-       //int retval = 0;\r
-       char * selected_serial_port;\r
-       int param = 0;\r
-       int * pparam = &param;\r
-\r
-       dbg_print(PRINT_LEVEL_INFO, "%s -- %s %s\n", argv[0], __DATE__, __TIME__);\r
-\r
-       // accept only 1\r
-       if (argc < 2)\r
-       {\r
-               usage(argv[0]);\r
-               dbg_print(PRINT_LEVEL_INFO, "attempting to use COM6\n\n");\r
-               selected_serial_port = "COM6";\r
-       }\r
-       else\r
-       {\r
-               selected_serial_port = argv[1];\r
-\r
-       }\r
-       int serialPortFd = rpcOpen(selected_serial_port, 0);\r
-       if (serialPortFd == -1)\r
-       {\r
-               dbg_print(PRINT_LEVEL_ERROR, "could not open serial port\n");\r
-               exit(-1);\r
-       }\r
-\r
-       //init the application thread to register the callbacks\r
-       rpcInitMq();\r
-       appInit();\r
-       //Start the Rx thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating RPC thread\n");\r
-       _beginthread(rpcTask, 0, (void *) pparam);\r
-       param++;\r
-\r
-       //Start the example thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating example thread\n");\r
-       _beginthread(appTask, 0, (void *) pparam);\r
-       param++;\r
-       // Start incoming message thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating example thread\n");\r
-       _beginthread(appInMessage, 0, (void *) pparam);\r
-\r
-       while (1)\r
-               ;\r
-\r
-}\r
diff --git a/examples/nwkTopology/build/windows/Makefile b/examples/nwkTopology/build/windows/Makefile
deleted file mode 100644 (file)
index 4f4bbbe..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-
-SBU_REV= "0.1"
-
-
-INCLUDE = -I$(PROJ_DIR)..\.. -I$(PROJ_DIR)..\..\..\..\framework\platform\windows -I$(PROJ_DIR)..\..\..\..\framework\rpcWindows -I$(PROJ_DIR)..\..\..\..\framework\mt -I$(PROJ_DIR)..\..\..\..\framework\mt\Af -I$(PROJ_DIR)..\..\..\..\framework\mt\Zdo -I$(PROJ_DIR)..\..\..\..\framework\mt\Sys -I$(PROJ_DIR)..\..\..\..\framework\mt\Sapi
-
-CC= gcc.exe
-#CC=\usr\local\angstrom\arm\bin\arm-angstrom-linux-gnueabi-gcc
-
-CFLAGS= -Wall -g -Wall  -c
-LIBS =
-DEFS += -D_OBJC_NO_COM
-PROJ_DIR=
-
-Debug: nwkTopology.exe
-
-nwkTopology.exe: main.o nwkTopology.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-       $(CC) $(LIBS) -o nwkTopology.exe main.o nwkTopology.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-
-# rule for file "main.o".
-main.o: $(PROJ_DIR)main.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)main.c
-
-# rule for file "nwkTopology.o".
-nwkTopology.o: $(PROJ_DIR)..\..\nwkTopology.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\nwkTopology.c\r
-\r
-# rule for file "rpcTransport.o".
-queue.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c\r
-\r
-# rule for file "rpcTransport.o".
-semaphore.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-
-# rule for file "rpc.o".
-rpc.o: $(PROJ_DIR)..\..\..\..\framework\rpc\rpc.h $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-
-# rule for file "mtParser.o".
-mtParser.o: $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.h $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-
-# rule for file "mtZdo.o".
-mtZdo.o: $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.h $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-
-# rule for file "mtSys.o".
-mtSys.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.h $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-
-# rule for file "mtAf.o".
-mtAf.o: $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.h $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-
-# rule for file "mtSapi.o".
-mtSapi.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.h $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-
-# rule for file "dbgPrint.o".
-dbgPrint.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-
-# rule for file "hostConsole.o".
-hostConsole.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-
-
-\r
-
-\r
-# rule for file "rpcTransport.o".
-rpcTransport.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c\r
-
-# rule for cleaning files generated during compilations.
-cleanDebug:
-       -del nwkTopology.exe *.o\r
-       echo Clean done
diff --git a/examples/nwkTopology/build/windows/main.c b/examples/nwkTopology/build/windows/main.c
deleted file mode 100644 (file)
index 229e870..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/**************************************************************************************************\r
- * Filename:       main.c\r
- * Description:    This file contains the main for the gnu platform.\r
- *\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <process.h>\r
-\r
-#include "rpc.h"\r
-#include "nwkTopology.h"\r
-\r
-#include "dbgPrint.h"\r
-\r
-void *rpcTask(void *argument)\r
-{\r
-       while (1)\r
-       {\r
-               rpcProcess();\r
-       }\r
-\r
-       dbg_print(PRINT_LEVEL_WARNING, "rpcTask exited!\n");\r
-}\r
-\r
-void *appTask(void *argument)\r
-{\r
-       while (1)\r
-       {\r
-               appProcess(NULL);\r
-       }\r
-}\r
-\r
-int main(int argc, char* argv[])\r
-{\r
-       //int retval = 0;\r
-       char * selected_serial_port;\r
-       int param = 0;\r
-       int * pparam = &param;\r
-\r
-       dbg_print(PRINT_LEVEL_INFO, "%s -- %s %s\n", argv[0], __DATE__, __TIME__);\r
-\r
-       // accept only 1\r
-       if (argc < 2)\r
-       {\r
-               usage(argv[0]);\r
-               dbg_print(PRINT_LEVEL_INFO, "attempting to use COM6\n\n");\r
-               selected_serial_port = "COM6";\r
-       }\r
-       else\r
-       {\r
-               selected_serial_port = argv[1];\r
-\r
-       }\r
-\r
-       int serialPortFd = rpcOpen(selected_serial_port, 0);\r
-       if (serialPortFd == -1)\r
-       {\r
-               dbg_print(PRINT_LEVEL_ERROR, "could not open serial port\n");\r
-               exit(-1);\r
-       }\r
-\r
-       //init the application thread to register the callbacks\r
-       rpcInitMq();\r
-\r
-       appInit();\r
-       //Start the Rx thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating RPC thread\n");\r
-       _beginthread(rpcTask, 0, (void *) pparam);\r
-       param++;\r
-\r
-       //Start the example thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating example thread\n");\r
-       _beginthread(appTask, 0, (void *) pparam);\r
-       param++;\r
-       while (1)\r
-               ;\r
-\r
-}\r
diff --git a/examples/nwkTopology/build/windows/nwkTopologyBuild/nwkTopologyBuild.cbp b/examples/nwkTopology/build/windows/nwkTopologyBuild/nwkTopologyBuild.cbp
deleted file mode 100644 (file)
index 2b50d02..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
-       <FileVersion major="1" minor="6" />
-       <Project>
-               <Option title="nwkTopologyBuild" />
-               <Option makefile_is_custom="1" />
-               <Option execution_dir="../../windows" />
-               <Option pch_mode="2" />
-               <Option compiler="gcc" />
-               <Build>
-                       <Target title="Debug">
-                               <Option output="nwkTopology" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Debug/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-g" />
-                               </Compiler>
-                       </Target>
-                       <Target title="Release">
-                               <Option output="bin/Release/nwkTopologyBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Release/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-O2" />
-                               </Compiler>
-                               <Linker>
-                                       <Add option="-s" />
-                               </Linker>
-                       </Target>
-               </Build>
-               <Compiler>
-                       <Add option="-Wall" />
-               </Compiler>
-               <Extensions>
-                       <code_completion />
-                       <envvars />
-                       <debugger />
-                       <lib_finder disable_auto="1" />
-               </Extensions>
-       </Project>
-</CodeBlocks_project_file>
diff --git a/examples/nwkTopology/build/windows/nwkTopologyBuild/nwkTopologyBuild.layout b/examples/nwkTopology/build/windows/nwkTopologyBuild/nwkTopologyBuild.layout
deleted file mode 100644 (file)
index 1053280..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
-       <ActiveTarget name="Debug" />
-</CodeBlocks_layout_file>
diff --git a/examples/servDisc/build/windows/Makefile b/examples/servDisc/build/windows/Makefile
deleted file mode 100644 (file)
index 792c243..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-
-SBU_REV= "0.1"
-
-
-INCLUDE = -I$(PROJ_DIR)..\.. -I$(PROJ_DIR)..\..\..\..\framework\platform\windows -I$(PROJ_DIR)..\..\..\..\framework\rpcWindows -I$(PROJ_DIR)..\..\..\..\framework\mt -I$(PROJ_DIR)..\..\..\..\framework\mt\Af -I$(PROJ_DIR)..\..\..\..\framework\mt\Zdo -I$(PROJ_DIR)..\..\..\..\framework\mt\Sys -I$(PROJ_DIR)..\..\..\..\framework\mt\Sapi
-
-CC= gcc.exe
-#CC=\usr\local\angstrom\arm\bin\arm-angstrom-linux-gnueabi-gcc
-
-CFLAGS= -Wall -g -Wall  -c
-LIBS =
-DEFS += -D_OBJC_NO_COM
-PROJ_DIR=
-
-Debug: servDisc.exe
-
-servDisc.exe: main.o servDisc.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-       $(CC) $(LIBS) -o servDisc.exe main.o servDisc.o queue.o semaphore.o rpc.o mtParser.o mtZdo.o mtSys.o mtAf.o mtSapi.o dbgPrint.o hostConsole.o rpcTransport.o
-
-# rule for file "main.o".
-main.o: $(PROJ_DIR)main.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)main.c
-
-# rule for file "servDisc.o".
-servDisc.o: $(PROJ_DIR)..\..\servDisc.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\servDisc.c\r
-\r
-# rule for file "rpcTransport.o".
-queue.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\queue.c\r
-\r
-# rule for file "rpcTransport.o".
-semaphore.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\semaphore.c
-
-# rule for file "rpc.o".
-rpc.o: $(PROJ_DIR)..\..\..\..\framework\rpc\rpc.h $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\rpcWindows\rpc.c
-
-# rule for file "mtParser.o".
-mtParser.o: $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.h $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\mtParser.c
-
-# rule for file "mtZdo.o".
-mtZdo.o: $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.h $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Zdo\mtZdo.c
-
-# rule for file "mtSys.o".
-mtSys.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.h $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sys\mtSys.c
-
-# rule for file "mtAf.o".
-mtAf.o: $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.h $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Af\mtAf.c
-
-# rule for file "mtSapi.o".
-mtSapi.o: $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.h $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\mt\Sapi\mtSapi.c
-
-# rule for file "dbgPrint.o".
-dbgPrint.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\dbgPrint.c
-
-# rule for file "hostConsole.o".
-hostConsole.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\hostConsole.c
-
-
-\r
-
-\r
-# rule for file "rpcTransport.o".
-rpcTransport.o: $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.h $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c
-       $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)..\..\..\..\framework\platform\windows\rpcTransport.c\r
-
-# rule for cleaning files generated during compilations.
-cleanDebug:
-       -del servDisc.exe *.o\r
-       echo Clean done
diff --git a/examples/servDisc/build/windows/main.c b/examples/servDisc/build/windows/main.c
deleted file mode 100644 (file)
index 32e562e..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/**************************************************************************************************\r
- * Filename:       main.c\r
- * Description:    This file contains the main for the gnu platform.\r
- *\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <process.h>\r
-\r
-#include "rpc.h"\r
-#include "servDisc.h"\r
-\r
-#include "dbgPrint.h"\r
-\r
-void *rpcTask(void *argument)\r
-{\r
-       while (1)\r
-       {\r
-               rpcProcess();\r
-       }\r
-\r
-       dbg_print(PRINT_LEVEL_WARNING, "rpcTask exited!\n");\r
-}\r
-\r
-void *appTask(void *argument)\r
-{\r
-       while (1)\r
-       {\r
-               appProcess(NULL);\r
-       }\r
-}\r
-\r
-int main(int argc, char* argv[])\r
-{\r
-       //int retval = 0;\r
-       char * selected_serial_port;\r
-       int param = 0;\r
-       int * pparam = &param;\r
-\r
-       dbg_print(PRINT_LEVEL_INFO, "%s -- %s %s\n", argv[0], __DATE__, __TIME__);\r
-\r
-       // accept only 1\r
-       if (argc < 2)\r
-       {\r
-               usage(argv[0]);\r
-               dbg_print(PRINT_LEVEL_INFO, "attempting to use COM6\n\n");\r
-               selected_serial_port = "COM6";\r
-       }\r
-       else\r
-       {\r
-               selected_serial_port = argv[1];\r
-\r
-       }\r
-\r
-       int serialPortFd = rpcOpen(selected_serial_port, 0);\r
-       if (serialPortFd == -1)\r
-       {\r
-               dbg_print(PRINT_LEVEL_ERROR, "could not open serial port\n");\r
-               exit(-1);\r
-       }\r
-\r
-       //init the application thread to register the callbacks\r
-       rpcInitMq();\r
-\r
-       appInit();\r
-       //Start the Rx thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating RPC thread\n");\r
-       _beginthread(rpcTask, 0, (void *) pparam);\r
-       param++;\r
-\r
-       //Start the example thread\r
-       dbg_print(PRINT_LEVEL_INFO, "creating example thread\n");\r
-       _beginthread(appTask, 0, (void *) pparam);\r
-       param++;\r
-       while (1)\r
-               ;\r
-\r
-}\r
diff --git a/examples/servDisc/build/windows/servDiscBuild/servDiscBuild.cbp b/examples/servDisc/build/windows/servDiscBuild/servDiscBuild.cbp
deleted file mode 100644 (file)
index c65a081..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
-       <FileVersion major="1" minor="6" />
-       <Project>
-               <Option title="servDiscBuild" />
-               <Option makefile_is_custom="1" />
-               <Option execution_dir="../../windows" />
-               <Option pch_mode="2" />
-               <Option compiler="gcc" />
-               <Build>
-                       <Target title="Debug">
-                               <Option output="bin/Debug/servDiscBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Debug/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-g" />
-                               </Compiler>
-                       </Target>
-                       <Target title="Release">
-                               <Option output="bin/Release/servDiscBuild" prefix_auto="1" extension_auto="1" />
-                               <Option object_output="obj/Release/" />
-                               <Option type="1" />
-                               <Option compiler="gcc" />
-                               <Compiler>
-                                       <Add option="-O2" />
-                               </Compiler>
-                               <Linker>
-                                       <Add option="-s" />
-                               </Linker>
-                       </Target>
-               </Build>
-               <Compiler>
-                       <Add option="-Wall" />
-               </Compiler>
-               <Extensions>
-                       <code_completion />
-                       <envvars />
-                       <debugger />
-                       <lib_finder disable_auto="1" />
-               </Extensions>
-       </Project>
-</CodeBlocks_project_file>
diff --git a/examples/servDisc/build/windows/servDiscBuild/servDiscBuild.layout b/examples/servDisc/build/windows/servDiscBuild/servDiscBuild.layout
deleted file mode 100644 (file)
index 1053280..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
-       <ActiveTarget name="Debug" />
-</CodeBlocks_layout_file>
diff --git a/framework/platform/windows/dbgPrint.c b/framework/platform/windows/dbgPrint.c
deleted file mode 100644 (file)
index 1a17134..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * dbgPrint.c
- *
- * This module contains the API for debug print.
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-/*********************************************************************
- * INCLUDES
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "dbgPrint.h"
-
-/*********************************************************************
- * MACROS
- */
-
-/*********************************************************************
- * LOCAL VARIABLE
- */
-
-/*********************************************************************
- * LOCAL FUNCTIONS
- */
-
-
-/*********************************************************************
- * API FUNCTIONS
- */
-
-/**************************************************************************************************
- * @fn          dbgPrint
- *
- * @brief       This function checks the print level and prints if required.
- *
- * input parameters
- *
- * @param       simpleDesc - A pointer to the simpleDesc descriptor to register.
- *
- * output parameters
- *
- * None.
- *
- * @return      None.
- **************************************************************************************************
- */
-void dbg_print(int print_level, const char *fmt, ...)
-{
-       if(print_level > PRINT_LEVEL)
-       {
-               return;
-       }
-       else
-       {
-               va_list argp;
-               va_start(argp, fmt);
-               vprintf(fmt, argp);
-               va_end(argp);
-       }
-}
diff --git a/framework/platform/windows/dbgPrint.h b/framework/platform/windows/dbgPrint.h
deleted file mode 100644 (file)
index e91b2ce..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * dbgPrint.h
- *
- * This module contains the API for debug print.
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-#ifndef DBGPRINT_H
-#define DBGPRINT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
-       PRINT_LEVEL_ERROR,
-       PRINT_LEVEL_WARNING,
-       PRINT_LEVEL_INFO,
-       PRINT_LEVEL_INFO_LOWLEVEL,
-       PRINT_LEVEL_VERBOSE
-};
-
-#define PRINT_LEVEL PRINT_LEVEL_WARNING
-//#define PRINT_LEVEL PRINT_LEVEL_VERBOSE
-void dbg_print(int printf_level, const char *fmt, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DBGPRINT_H */
diff --git a/framework/platform/windows/hostConsole.c b/framework/platform/windows/hostConsole.c
deleted file mode 100644 (file)
index 31ee8ab..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * hostConsole.c
- *
- * This module contains the API for console support.
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*********************************************************************
- * INCLUDES
- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <conio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "hostConsole.h"
-#include "dbgPrint.h"
-
-
-/*********************************************************************
- * MACROS
- */
-
-/*********************************************************************
- * LOCAL VARIABLE
- */
-
-/*********************************************************************
- * LOCAL FUNCTIONS
- */
-
-/*********************************************************************
- * API FUNCTIONS
- */
-
-/**************************************************************************************************
- * @fn          consoleGetCh
- *
- * @brief       This function gets a char from the console
- *
- * input parameters
- *
- * @param
- *
- * output parameters
- *
- * None.
- *
- * @return      None.
- **************************************************************************************************
- */
-char consoleGetCh() {\r
-    unsigned char ch = _getch();\r
-    static int isDir = 0;\r
-    switch (ch)\r
-    {\r
-    case 8:\r
-        ch = 127;\r
-        break;\r
-    case 13:\r
-        ch = '\n';\r
-        break;\r
-    case 224://is direction key\r
-        isDir = 1;\r
-        ch = 27;\r
-        break;\r
-    case 72://up\r
-        if(isDir == 1)\r
-        {\r
-            ch = 'A';\r
-            isDir = 0;\r
-        }\r
-        break;\r
-    case 80://down\r
-        if(isDir == 1)\r
-        {\r
-            ch = 'B';\r
-            isDir = 0;\r
-        }\r
-        break;\r
-    case 75://left\r
-        if(isDir == 1)\r
-        {\r
-            ch = 'D';\r
-            isDir = 0;\r
-        }\r
-        break;\r
-    case 77://right\r
-        if(isDir == 1)\r
-        {\r
-            ch = 'C';\r
-            isDir = 0;\r
-        }\r
-\r
-        break;\r
-    }
-       return ch;
-}
-
-int idxpHist = 0;
-int pHistIsRollover = 0;\r
-
-int pHistMax = 256;
-char pHist[256][256];
-/**************************************************************************************************
- * @fn          consoleGetLine
- *
- * @brief       This function gets a line from the console.
- *
- * input parameters
- *
- * @param
- *
- * output parameters
- *
- * None.
- *
- * @return      None.
- **************************************************************************************************
- */
-int consoleGetLine(char *ln, int maxLen)
-{
-    int chIdx, isDir, cPos, currpHist;
-    char ch;
-    char tempStr[256];
-    char temppHist[256];
-    chIdx = isDir = cPos = currpHist = 0;
-    ln[0] = '\0';\r
-
-    while (chIdx < maxLen)
-    {
-        ch = consoleGetCh();\r
-        //consoleClearLn();\r
-
-        if ((ch == '\n') || (chIdx == (maxLen - 1)))
-        {
-
-            if ((idxpHist == 0 && pHistIsRollover == 0)
-                    || strcmp(pHist[(pHistMax + idxpHist - 1) % pHistMax], ln)
-                            != 0)
-            {
-                strcpy(pHist[idxpHist], ln);
-                idxpHist = ((idxpHist + 1) % pHistMax);
-            }
-            if (idxpHist == 0)
-            {
-                pHistIsRollover = 1;
-            }
-            //ln[chIdx++] = '\n';\r
-            //ln[chIdx] = '\0';\r
-            printf("\n");
-            break;
-        }
-        switch (ch)
-        {
-        case 127:
-            //backspace was press
-            //clear line
-            if (chIdx > 0)
-            {
-                if (cPos < chIdx)
-                {
-                    int x;
-                    for (x = 0; x < cPos; x++)
-                    {
-                        ln[chIdx - cPos + x - 1] = tempStr[cPos - x - 1];
-                    }
-                    ln[--chIdx] = '\0';
-                }
-                //consoleClearLn();
-                //printf("\r%s", ln);\r
-                printf("\b \b");
-
-            } else
-            {
-                consoleClearLn();
-                printf("\r");
-            }
-            break;
-        case 27:
-            isDir = 1;
-            if (chIdx > 0)
-            {
-                consoleClearLn();
-                printf("\r%s", ln);
-
-            } else
-            {
-                consoleClearLn();
-                printf("\r");
-            }
-
-            break;
-        default:
-            if (isDir)
-            {
-                if (ch == '[')
-                {
-                    isDir = 1;
-                } else if (ch == 'A')
-                {
-                    if (currpHist < idxpHist)
-                    {
-                        cPos = 0;
-                        if (currpHist)
-                        {
-                            strcpy(pHist[idxpHist - currpHist], ln);
-                        }
-                        if (currpHist == 0)
-                            strcpy(temppHist, ln);
-                        currpHist++;
-                        strcpy(ln, pHist[idxpHist - currpHist]);
-                        chIdx = strlen(ln);
-
-                    }
-
-                    isDir = 0;
-                } else if (ch == 'B')
-                {
-                    if (currpHist)
-                    {
-                        strcpy(pHist[idxpHist - currpHist], ln);
-                        currpHist--;
-                        if (currpHist)
-                        {
-                            strcpy(ln, pHist[idxpHist - currpHist]);
-                        } else
-                        {
-                            strcpy(ln, temppHist);
-                        }
-                        chIdx = strlen(ln);
-
-                    }
-                    isDir = 0;
-                } else if (ch == 'C')
-                {
-                    if (cPos > 0)
-                    {
-                        cPos--;
-                    }
-
-                    isDir = 0;
-                } else if (ch == 'D')
-                {
-                    if (cPos < chIdx)
-                    {
-                        tempStr[cPos] = ln[chIdx - cPos - 1];
-                        cPos++;
-                    }
-                    isDir = 0;
-                } else
-                {
-                    isDir = 0;
-                }
-                //consoleClearLn();
-                //printf("\r%s", ln);
-            } else
-            {
-                if (cPos != 0)
-                {
-                    ln[chIdx - cPos] = ch;
-                    int x;
-                    for (x = 1; x <= cPos; x++)
-                    {
-                        ln[chIdx - cPos + x] = tempStr[cPos - x];
-                    }
-                    ln[++chIdx] = '\0';
-                } else
-                {
-                    ln[chIdx++] = ch;
-                    ln[chIdx] = '\0';
-                }
-
-            }
-            consoleClearLn();
-            printf("\r%s", ln);
-            break;
-        }
-        int x;
-        for (x = 1; x <= cPos; x++)
-        {
-            consolePrint("\b");
-        }
-    }
-
-    return chIdx;
-}
diff --git a/framework/platform/windows/hostConsole.h b/framework/platform/windows/hostConsole.h
deleted file mode 100644 (file)
index c78f7aa..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * hostConsole.h
- *
- * This module contains the API for console support.
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-#ifndef HOSTCONSOLE_H
-#define HOSTCONSOLE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define consolePrint printf
-#define consoleClearLn(); printf("\r                                                       \r");
-#define consoleFlush(); fflush(stdout);
-
-char consoleGetCh();
-int consoleGetLine(char *ln, int maxLen);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* HOSTCONSOLE_H */
diff --git a/framework/platform/windows/queue.c b/framework/platform/windows/queue.c
deleted file mode 100644 (file)
index 7c15c79..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*\r
- * mqueue.c\r
- *\r
- * This module contains the POSIX wrapper for Semaphore.\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <unistd.h>\r
-#include <string.h>\r
-#include <time.h>\r
-#include "semaphore.h"\r
-#include "queue.h"\r
-void queInit(que_t *q)\r
-{\r
-    q->head = q->tail = NULL;\r
-    q->qSize = 0;\r
-}\r
-int32_t receive(que_t *q,uint8_t *buffer, uint32_t maxLength)\r
-{\r
-    int32_t rLength = -1;\r
-    if(q->qSize > 0 && q->head != NULL)\r
-    {\r
-\r
-        q->temp = q->head->ptr;\r
-        memcpy(buffer, q->head->data, q->head->length);\r
-        rLength = (int32_t)q->head->length;\r
-\r
-        if (q->temp != NULL)\r
-        {\r
-            free(q->head->data);\r
-            free(q->head);\r
-            q->head = q->temp;\r
-        }\r
-        else\r
-        {\r
-            free(q->head->data);\r
-            free(q->head);\r
-            q->head = NULL;\r
-            q->tail = NULL;\r
-        }\r
-\r
-        q->qSize--;\r
-\r
-    }\r
-    return rLength;\r
-}\r
-int32_t timedReceive(que_t *q, uint8_t *buffer, uint32_t maxLength,const struct timespec * abs_timeout)\r
-{\r
-    time_t timeout;\r
-    int32_t rLength = -1;\r
-  // calculate timeout\r
-  timeout = ((abs_timeout->tv_sec -time(0)) * (1000UL)) +(abs_timeout->tv_nsec/(1000000UL));\r
-  timeout = timeout/3;\r
-\r
-    do\r
-    {\r
-\r
-        usleep(3);\r
-        rLength = receive(q,buffer,maxLength);\r
-    }while(timeout-- > (time_t)0 && rLength == -1);\r
-    return rLength;\r
-}\r
-void addToHead(que_t *q,uint8_t *data, uint32_t length)\r
-{\r
-    if (q->head == NULL)\r
-    {\r
-        q->head = (node_t *)malloc(1*sizeof(node_t));\r
-        q->head->ptr = NULL;\r
-        q->head->data = (uint8_t *)malloc(length*(sizeof(uint8_t)));\r
-        q->head->length = length;\r
-        memcpy(q->head->data, data, length);\r
-        q->tail = q->head;\r
-    }\r
-    else\r
-    {\r
-        q->temp=(node_t *)malloc(1*sizeof(node_t));\r
-        q->temp->ptr = q->head;\r
-        q->temp->data = (uint8_t *)malloc(length*(sizeof(uint8_t)));\r
-        q->temp->length = length;\r
-        memcpy(q->temp->data, data, length);\r
-\r
-        q->head = q->temp;\r
-    }\r
-    q->qSize++;\r
-}\r
-void addToTail(que_t *q,uint8_t *data, uint32_t length)\r
-{\r
-\r
-    if (q->tail == NULL)\r
-    {\r
-        q->tail = (node_t *)malloc(1*sizeof(node_t));\r
-        q->tail->ptr = NULL;\r
-        q->tail->data = (uint8_t *)malloc(length*(sizeof(uint8_t)));\r
-        q->tail->length = length;\r
-        memcpy(q->tail->data, data, length);\r
-        q->head = q->tail;\r
-    }\r
-    else\r
-    {\r
-        q->temp=(node_t *)malloc(1*sizeof(node_t));\r
-        q->tail->ptr = q->temp;\r
-        q->temp->data = (uint8_t *)malloc(length*(sizeof(uint8_t)));\r
-        q->temp->length = length;\r
-        memcpy(q->temp->data, data, length);\r
-        q->temp->ptr = NULL;\r
-\r
-        q->tail = q->temp;\r
-    }\r
-    q->qSize++;\r
-}\r
-uint8_t isEmpty(que_t *q)\r
-{\r
-\r
-}\r
-\r
-uint32_t queuesize(que_t *q)\r
-{\r
-    return q->qSize;\r
-}\r
-\r
diff --git a/framework/platform/windows/queue.h b/framework/platform/windows/queue.h
deleted file mode 100644 (file)
index 51a2c64..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*\r
- * mqueue.h\r
- *\r
- * This module contains the POSIX wrapper for Semaphore.\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-\r
-#ifndef MQUEUE_H\r
-#define MQUEUE_H\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <unistd.h>\r
-#include "semaphore.h"\r
-\r
-struct node\r
-{\r
-    uint8_t *data;\r
-    uint8_t length;\r
-    struct node *ptr;\r
-};\r
-typedef struct node node_t;\r
-typedef struct {
-       node_t *head;\r
-       node_t *tail;\r
-       node_t *temp;\r
-       node_t *head1;\r
-       uint32_t qSize;
-} que_t;\r
-\r
-extern void queInit(que_t *q);\r
-extern int32_t receive(que_t *q,uint8_t *buffer, uint32_t maxLength);\r
-\r
-extern int32_t timedReceive(que_t *q, uint8_t *buffer, uint32_t maxLength,const struct timespec * abs_timeout);\r
-\r
-extern void addToHead(que_t *q,uint8_t *data, uint32_t length);\r
-extern void addToTail(que_t *q,uint8_t *data, uint32_t length);\r
-extern uint8_t isEmpty(que_t *q);\r
-\r
-extern uint32_t queuesize(que_t *q);\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif /* SEMAPHORE_H */\r
diff --git a/framework/platform/windows/rpcTransport.c b/framework/platform/windows/rpcTransport.c
deleted file mode 100644 (file)
index df4f8e9..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * rpcTransportUart.c
- *
- * This module contains the API for the zll SoC Host Interface.
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*********************************************************************
- * INCLUDES
- */\r
-#include <windows.h>
-//include <termios.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-//#include <sys/ioctl.h>
-
-#include <errno.h>
-#include <string.h>\r
-#include <unistd.h>\r
-#include <errno.h>
-#include <string.h>\r
-\r
-\r
-#include <commdlg.h>
-
-//#include "rpc.h"
-
-#include "dbgPrint.h"\r
-
-
-/*********************************************************************
- * MACROS
- */
-
-/*********************************************************************
- * CONSTANTS
- */
-/*******************************/
-/*** Bootloader Commands ***/
-/*******************************/
-#define SB_FORCE_BOOT               0xF8
-#define SB_FORCE_RUN               (SB_FORCE_BOOT ^ 0xFF)
-
-/************************************************************
- * TYPEDEFS
- */
-
-/*********************************************************************
- * GLOBAL VARIABLES
- */
-uint8_t uartDebugPrintsEnabled = 0;
-
-/*********************************************************************
- * LOCAL VARIABLES
- */
-
-HANDLE hSerial;\r
-COMMTIMEOUTS timeouts;\r
-COMMCONFIG dcbSerialParams;\r
-DWORD dwBytesWritten, dwBytesRead;
-/*********************************************************************
- * API FUNCTIONS
- */
-
-/*********************************************************************
- * @fn      rpcTransportOpen
- *
- * @brief   opens the serial port to the CC253x.
- *
- * @param   devicePath - path to the UART device
- *
- * @return  status
- */
-int32_t rpcTransportOpen(char *_devicePath, uint32_t port)
-{
-    hSerial = CreateFile(_devicePath, GENERIC_READ|GENERIC_WRITE, 0, NULL,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );\r
-       if (hSerial == INVALID_HANDLE_VALUE)\r
-       {\r
-               perror(_devicePath);\r
-               dbg_print(PRINT_LEVEL_ERROR, "rpcOpen: %s device open failed\n",\r
-                               _devicePath);\r
-               return (-1);\r
-       }\r
-    if (!GetCommState(hSerial, &dcbSerialParams.dcb))\r
-    {\r
-        dbg_print(PRINT_LEVEL_ERROR, "rpcOpen: get device state failed\n");\r
-    }\r
-\r
-    dcbSerialParams.dcb.DCBlength = sizeof(dcbSerialParams.dcb);\r
-\r
-\r
-    dcbSerialParams.dcb.BaudRate = CBR_115200;\r
-    dcbSerialParams.dcb.ByteSize = 8;\r
-    dcbSerialParams.dcb.StopBits = ONESTOPBIT;\r
-    dcbSerialParams.dcb.Parity = NOPARITY;\r
-\r
-    dcbSerialParams.dcb.fBinary = TRUE;\r
-    dcbSerialParams.dcb.fDtrControl = DTR_CONTROL_DISABLE;\r
-    dcbSerialParams.dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;\r
-    dcbSerialParams.dcb.fOutxCtsFlow = TRUE;\r
-    dcbSerialParams.dcb.fOutxDsrFlow = FALSE;\r
-    dcbSerialParams.dcb.fDsrSensitivity= FALSE;\r
-    dcbSerialParams.dcb.fAbortOnError = TRUE;\r
-\r
-    if (!SetCommState(hSerial, &dcbSerialParams.dcb))\r
-    {\r
-        dbg_print(PRINT_LEVEL_ERROR, "rpcOpen: error setting serial port state\n");\r
-    }\r
-\r
-\r
-    GetCommTimeouts(hSerial,&timeouts);\r
-    //COMMTIMEOUTS timeouts = {0};\r
-\r
-    timeouts.ReadIntervalTimeout = 500;\r
-    timeouts.ReadTotalTimeoutConstant = 500;\r
-    timeouts.ReadTotalTimeoutMultiplier = 100;\r
-    timeouts.WriteTotalTimeoutConstant = 500;\r
-    timeouts.WriteTotalTimeoutMultiplier= 100;\r
-\r
-    if(!SetCommTimeouts(hSerial, &timeouts))\r
-    {\r
-        dbg_print(PRINT_LEVEL_ERROR, "rpcOpen: error setting serial port timeouts\n");\r
-    }\r
-\r
-\r
-\r
-       return hSerial;
-}
-
-/*********************************************************************
- * @fn      rpcTransportClose
- *
- * @brief   closes the serial port to the CC253x.
- *
- * @param   fd - file descriptor of the UART device
- *
- * @return  status
- */
-void rpcTransportClose(void)
-{
-    //tcflush(serialPortFd, TCOFLUSH);
-    //close(serialPortFd);
-    CloseHandle(hSerial);
-    return;
-}
-
-/*********************************************************************
- * @fn      rpcTransportWrite
- *
- * @brief   Write to the the serial port to the CC253x.
- *
- * @param   fd - file descriptor of the UART device
- *
- * @return  status
- */
-void rpcTransportWrite(uint8_t* buf, uint8_t len)
-{
-    int remain = len;
-    int offset = 0;\r
-    dwBytesWritten = 0;
-#if 0
-    dbg_print(PRINT_LEVEL_VERBOSE, "rpcTransportWrite : len = %d\n", len);
-
-    while (remain > 0)
-    {
-        int sub = (remain >= 8 ? 8 : remain);
-        dbg_print(PRINT_LEVEL_VERBOSE, "writing %d bytes (offset = %d, remain = %d)\n", sub, offset, remain);
-        //write(serialPortFd, buf + offset, sub);
-        WriteFile(hSerial, buf + offset, sub, &dwBytesWritten, NULL);
-        //tcflush(serialPortFd, TCOFLUSH);
-        usleep(1000);
-        remain -= 8;
-        offset += 8;
-    }
-#else\r
-    dbg_print(PRINT_LEVEL_VERBOSE, "rpcTransportWrite : len = %d\n", len);\r
-    if(!WriteFile(hSerial, buf , len, &dwBytesWritten, NULL))\r
-    {\r
-        printf("Write Error");\r
-    }\r
-    dbg_print(PRINT_LEVEL_VERBOSE, "rpcTransportWrite : %d Bytes written\n", dwBytesWritten);\r
-
-    //write (serialPortFd, buf, len);
-    //tcflush(serialPortFd, TCOFLUSH);
-
-#endif
-    return;
-}
-
-/*********************************************************************
- * @fn      rpcTransportRead
- *
- * @brief   Reads from the the serial port to the CC253x.
- *
- * @param   fd - file descriptor of the UART device
- *
- * @return  status
- */
-uint8_t rpcTransportRead(uint8_t* buf, uint8_t len)
-{\r
-    //uint8_t *buffer = malloc(len*sizeof(uint8_t));
-    dwBytesRead = 0;\r
-    do\r
-    {\r
-        ReadFile(hSerial, buf, len, &dwBytesRead, NULL);\r
-        usleep(1);\r
-    }while(dwBytesRead == 0);\r
-\r
-    //*buf = (uint8_t)(buffer);
-    if(dwBytesRead > 0)
-    {
-       dbg_print(PRINT_LEVEL_VERBOSE, "rpcTransportRead: read %d bytes\n", dwBytesRead);
-    }
-    return (dwBytesRead);
-
-}
diff --git a/framework/platform/windows/rpcTransport.h b/framework/platform/windows/rpcTransport.h
deleted file mode 100644 (file)
index 49692bf..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * rpcTransport.h
- *
- * This module contains the API for the zll SoC Host Interface.
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef RPCTRANSPORT_H
-#define RPCTRANSPORT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/********************************************************************/
-// ZigBee Soc API\r
-//int clearBuffers(HANDLE serial);
-int32_t rpcTransportOpen(char *devicePath, uint32_t port);
-void rpcTransportClose(void);
-void rpcTransportWrite(uint8_t* buf, uint8_t len);
-uint8_t rpcTransportRead(uint8_t* buf, uint8_t len);
-uint8_t rpcTransportPoll(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RPCTRANSPORT_H */
diff --git a/framework/platform/windows/semaphore.c b/framework/platform/windows/semaphore.c
deleted file mode 100644 (file)
index 7ab803e..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*\r
- * semaphore.c\r
- *\r
- * This module contains the POSIX wrapper for Semaphore.\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-\r
-/*********************************************************************\r
- * INCLUDES\r
- */\r
-\r
-#include <errno.h>\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <unistd.h>\r
-#include <string.h>\r
-\r
-\r
-\r
-#include "semaphore.h"\r
-\r
-/*********************************************************************\r
- * MACROS\r
- */\r
-\r
-\r
-/*********************************************************************\r
- * CONSTANTS\r
- */\r
-\r
-/************************************************************\r
- * TYPEDEFS\r
- */\r
-\r
-/*********************************************************************\r
- * GLOBAL VARIABLES\r
- */\r
-\r
-/*********************************************************************\r
- * LOCAL VARIABLES\r
- */\r
-\r
-/*********************************************************************\r
- * LOCAL FUNCTIONS DECLARATIONS\r
- */\r
-\r
-\r
-/*********************************************************************\r
- * API FUNCTIONS\r
- */\r
-\r
-sem_t *sem_open(const char *name, int oflag)\r
-{\r
-  sem_t* sem;\r
-\r
-\r
-  // allocate memory for handle\r
-  sem = (sem_t *) malloc(sizeof(sem_t));\r
-  if(sem == NULL)\r
-  {\r
-    // set error\r
-       sem = SEM_FAILED;\r
-  }\r
-\r
-  return sem;\r
-}\r
-\r
-int sem_close(sem_t *sem)\r
-{\r
-  int ret = 0;\r
-\r
-\r
-\r
-  return ret;\r
-}\r
-\r
-int sem_init(sem_t *sem, int pshared, unsigned int value)\r
-{\r
-  int ret = 0;\r
-\r
-  // create semaphore instance\r
-  (*sem) = (sem_t)value;\r
-  if(*sem == NULL)\r
-  {\r
-    // error\r
-    ret = -1;\r
-\r
-    // set errno - TODO\r
-  }\r
-\r
-  return ret;\r
-}\r
-\r
-int sem_destroy (sem_t *sem)\r
-{\r
-  int ret = -1;\r
-\r
-\r
-\r
-  return ret;\r
-}\r
-\r
-int sem_wait(sem_t * sem)\r
-{\r
-\r
-    while(*sem != (sem_t)1);\r
-    *sem = (sem_t)0;\r
-  return 0;\r
-}\r
-\r
-int sem_timedwait(sem_t * sem, const struct timespec * abs_timeout)\r
-{\r
-  time_t timeout;\r
-\r
-  // calculate timeout\r
-  timeout = ((abs_timeout->tv_sec -time(0)) * (1000UL)) +(abs_timeout->tv_nsec/(1000UL));\r
-    while(timeout-- > 0 && *sem != (sem_t)1)\r
-    {\r
-        usleep(1);\r
-    }\r
-    if(*sem == (sem_t)1)\r
-    {\r
-        *sem = (sem_t)0;\r
-        return 0;\r
-    }\r
-\r
-  return -1;\r
-}\r
-\r
-int sem_post(sem_t * sem)\r
-{\r
-  int ret = -1;\r
-\r
-  if(*sem == (sem_t)0)\r
-  {\r
-       // post semaphore\r
-       *sem = (sem_t)1;\r
-\r
-       // return success\r
-       ret = 0;\r
-  }\r
-\r
-\r
-  return ret;\r
-}\r
-\r
-\r
-/*********************************************************************\r
- * LOCAL FUNCTIONS DEFINITIONS\r
- */\r
-\r
diff --git a/framework/platform/windows/semaphore.h b/framework/platform/windows/semaphore.h
deleted file mode 100644 (file)
index 8f89eb4..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*\r
- * semaphore.h\r
- *\r
- * This module contains the POSIX wrapper for Semaphore.\r
- *\r
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-\r
-#ifndef SEMAPHORE_H\r
-#define SEMAPHORE_H\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-/*********************************************************************\r
- * INCLUDES\r
- */\r
-#include <time.h>\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <unistd.h>\r
-#include <string.h>\r
-/*********************************************************************\r
- * MACROS\r
- */\r
-\r
-\r
-/*********************************************************************\r
- * CONSTANTS\r
- */\r
-\r
-/* Value returned if `sem_open' failed.  */\r
-#define SEM_FAILED      ((sem_t *) 0)\r
-\r
-\r
-/************************************************************\r
- * TYPEDEFS\r
- */\r
-//typedef unsigned long int time_t;\r
-\r
-struct timespec\r
-{\r
-   time_t   tv_sec;             // seconds\r
-   long     tv_nsec;            // nanoseconds\r
-};\r
-\r
-typedef struct timespec timespec;\r
-typedef uint8_t sem_t;\r
-\r
-/*********************************************************************\r
- * API FUNCTIONS\r
- */\r
-\r
-/*********************************************************************\r
- * @fn      sem_open\r
- *\r
- * @brief   creates a new POSIX semaphore or opens an existing semaphore.\r
- *\r
- * @param   name - pointer to semaphore name\r
- * @param   oflag - control operation flag\r
- *\r
- * @return  address of the new semaphore or SEM_FAILED if fails\r
- */\r
-extern sem_t *sem_open(const char *name, int oflag);\r
-\r
-/*********************************************************************\r
- * @fn      sem_close\r
- *\r
- * @brief   creates a new POSIX semaphore or opens an existing semaphore.\r
- *\r
- * @param   name - pointer to semaphore name\r
- * @param   oflag - control operation flag\r
- *\r
- * @return  address of the new semaphore or SEM_FAILED if fails\r
- */\r
-extern int sem_close(sem_t *sem);\r
-\r
-\r
-/*********************************************************************\r
- * @fn      sem_init\r
- *\r
- * @brief   populates the Frame Check Sequence of the RPC payload.\r
- *\r
- * @param   msg - pointer to the RPC message\r
- *\r
- * @return  none\r
- */\r
-extern int sem_init(sem_t *sem, int pshared, unsigned int value);\r
-\r
-extern int sem_destroy (sem_t *sem);\r
-\r
-extern int sem_wait(sem_t * sem);\r
-\r
-extern int sem_timedwait(sem_t * sem, const struct timespec * abs_timeout);\r
-\r
-extern int sem_post(sem_t * sem);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif /* SEMAPHORE_H */\r
diff --git a/framework/rpcWindows/rpc.c b/framework/rpcWindows/rpc.c
deleted file mode 100644 (file)
index 198aaae..0000000
+++ /dev/null
@@ -1,568 +0,0 @@
-/*\r
- * rpc.c\r
- *\r
- * This module contains the RPC (Remote Procedure Call) API for the\r
- * ZigBee Network Processor (ZNP) Host Interface.\r
- *\r
- * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/\r
- *\r
- *\r
- *  Redistribution and use in source and binary forms, with or without\r
- *  modification, are permitted provided that the following conditions\r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the\r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-\r
-/*********************************************************************\r
- * INCLUDES\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <unistd.h>\r
-#include <ctype.h>\r
-#include <fcntl.h>      // For O_* constants\r#include <errno.h>\r
-#include <signal.h>\r
-#include "semaphore.h"\r
-#include "queue.h"\r
-//#include <mqueue.h>\r
-#include <time.h>\r
-\r
-#include "rpc.h"\r
-#include "rpcTransport.h"\r
-#include "mtParser.h"\r
-#include "dbgPrint.h"\r
-\r
-/*********************************************************************\r
- * MACROS\r
- */\r
-\r
-/*********************************************************************\r
- * CONSTANTS\r
- */\r
-\r
-#define SB_FORCE_BOOT              (0xF8)\r
-#define SB_FORCE_RUN               (SB_FORCE_BOOT ^ 0xFF)\r
-\r
-#define SRSP_TIMEOUT_MS            (2000) // 2000ms timeout\r
-/*********************************************************************\r
- * GLOBAL VARIABLES\r
- */\r
-\r
-/*********************************************************************\r
- * LOCAL VARIABLES\r
- */\r
-\r
-// semaphore for sending RPC frames (used for mutual exclusion for\r
-// calling rpcSendFrame() function - from application thread(s) )\r
-static sem_t rpcSem;\r
-\r
-// semaphore for SRSP (Synchronous Response) used by application thread\r
-// to wait for any response from the ZNP. The RPC thread will post\r
-// the semaphore if any incoming message exists\r
-static sem_t srspSem;\r
-\r
-// expected SRSP command ID\r
-static uint8_t expectedSrspCmdId;\r
-\r
-// RPC message queue for passing RPC frame from RPC process to APP process\r
-//static mqd_t rpcQueue = (mqd_t) -1;\r
-static que_t rpcQueue;\r
-\r
-/*********************************************************************\r
- * EXTERNAL VARIABLES\r
- */\r
-\r
-/*********************************************************************\r
- * LOCAL FUNCTIONS DECLARATION\r
- */\r
-\r
-// function for calculating FCS in RPC UART frame\r
-static uint8_t calcFcs(uint8_t *msg, uint8_t len);\r
-\r
-// function for printing out RPC frames\r
-static void printRpcMsg(char* preMsg, uint8_t sof, uint8_t len, uint8_t *msg);\r
-\r
-/*********************************************************************\r
- * API FUNCTIONS\r
- */\r
-\r
-/*********************************************************************\r
- * @fn      rpcOpen\r
- *\r
- * @brief   opens the serial port to the CC253x.\r
- *\r
- * @param   devicePath - path to the UART device\r
- *\r
- * @return  status\r
- */\r
-int32_t rpcOpen(char *_devicePath, uint32_t port)\r
-{\r
-       int fd;\r
-\r
-       // open RPC transport\r
-       fd = rpcTransportOpen(_devicePath, port);\r
-       if (fd < 0)\r
-       {\r
-               perror(_devicePath);\r
-               dbg_print(PRINT_LEVEL_ERROR, "rpcOpen: %s device open failed\n",\r
-                       _devicePath);\r
-               return (-1);\r
-       }\r
-\r
-       sem_init(&rpcSem, 0, 1); // initialize mutex to 1 - binary semaphore\r
-       sem_init(&srspSem, 0, 0); // initialize mutex to 0 - binary semaphore\r
-\r
-       //rpcForceRun();\r
-\r
-       return fd;\r
-}\r
-\r
-/*********************************************************************\r
- * @fn      rpcInitMq\r
- *\r
- * @brief   init message queue\r
- *\r
- * @param   -\r
- *\r
- * @return  status\r
- */\r
-int32_t rpcInitMq(void)\r
-{\r
-       //char qname[32];\r
-       //struct mq_attr attr;\r
-\r
-       // initialize the queue attributes\r
-       //attr.mq_flags = 0;\r
-       //attr.mq_maxmsg = 10;\r
-       //attr.mq_msgsize = RPC_MAX_LEN;\r
-       //attr.mq_curmsgs = 0;\r
-       //sprintf(qname, "/mquec%d", getpid());\r
-\r
-       // create the message queue\r
-       //rpcQueue = mq_open((const char*)qname, O_CREAT | O_RDWR,\r
-       queInit(&rpcQueue);                             //    0644, &attr);\r
-       //dbg_print(PRINT_LEVEL_INFO, "rpcInitMqClient: rpcQueue = %s - %d\n",\r
-       //qname, rpcQueue);\r
-\r
-       //return ((int32_t)rpcQueue);\r
-       return 0;\r
-}\r
-\r
-/*********************************************************************\r
- * @fn      rpcGetMqClientMsg\r
- *\r
- * @brief   wait (blocking function) for incoming message and process\r
- *          it\r
- *\r
- * @param   -\r
- *\r
- * @return  status\r
- */\r
-int32_t rpcGetMqClientMsg(void)\r
-{\r
-       uint8_t rpcFrame[RPC_MAX_LEN + 1];\r
-       int32_t rpcLen;\r
-\r
-       dbg_print(PRINT_LEVEL_INFO, "rpcWaitMqClient: waiting on queue\n");\r
-\r
-       // wait for incoming message queue\r
-       rpcLen = receive(&rpcQueue, rpcFrame, RPC_MAX_LEN + 1); //mq_receive(rpcQueue, (char*) rpcFrame,\r
-       //RPC_MAX_LEN + 1, NULL);\r
-       if (rpcLen != -1)\r
-       {\r
-               dbg_print(PRINT_LEVEL_VERBOSE, "rpcWaitMqClient: processing MT[%d]\n",\r
-                       rpcLen);\r
-\r
-               // process incoming message\r
-               mtProcess(rpcFrame, rpcLen);\r
-       }\r
-       else\r
-       {\r
-               dbg_print(PRINT_LEVEL_WARNING, "rpcWaitMqClient: Timeout\n");\r
-               return -1;\r
-       }\r
-\r
-       return 0;\r
-}\r
-\r
-/*********************************************************************\r
- * @fn      rpcWaitMqClientMsg\r
- *\r
- * @brief   wait (with timeout) for incoming message and process\r
- *          it\r
- *\r
- * @param   -\r
- *\r
- * @return  status\r
- */\r
-int32_t rpcWaitMqClientMsg(uint32_t timeout)\r
-{\r
-       uint8_t rpcFrame[RPC_MAX_LEN + 1];\r
-       int32_t rpcLen;\r
-       struct timespec to;\r
-\r
-       // calculate timeout\r
-       to.tv_sec = time(0) + (timeout / 1000);\r
-       to.tv_nsec = (long) ((long) timeout % 1000) * 1000000L;\r
-\r
-       //dbg_print(PRINT_LEVEL_INFO, "rpcWaitMqClientMsg: timeout=%d\n", timeout);\r
-       //dbg_print(PRINT_LEVEL_INFO, "rpcWaitMqClientMsg: waiting on queue %d:%d:%d\n", timeout, to.tv_sec, to.tv_nsec);\r
-       rpcLen = timedReceive(&rpcQueue, rpcFrame, RPC_MAX_LEN + 1, &to);\r
-       if (rpcLen != -1)\r
-       {\r
-               dbg_print(PRINT_LEVEL_INFO, "rpcWaitMqClientMsg: processing MT[%d]\n",\r
-                       rpcLen);\r
-\r
-               // process incoming message\r
-               mtProcess(rpcFrame, rpcLen);\r
-       }\r
-       else\r
-       {\r
-               //dbg_print(PRINT_LEVEL_INFO, "rpcWaitMqClientMsg: Timed out [%d] - %s\n", rpcLen, strerror (errno));\r
-               return -1;\r
-       }\r
-\r
-       return 0;\r
-}\r
-\r
-/*********************************************************************\r
- * @fn      rpcForceRun\r
- *\r
- * @brief   send force run bootloader command\r
- *\r
- * @param   -\r
- *\r
- * @return  -\r
- */\r
-void rpcForceRun(void)\r
-{\r
-       uint8_t forceBoot = SB_FORCE_RUN;\r
-\r
-       // send the bootloader force boot incase we have a bootloader that waits\r
-       rpcTransportWrite(&forceBoot, 1);\r
-}\r
-\r
-/*************************************************************************************************\r
- * @fn      rpcProcess()\r
- *\r
- * @brief   Read bytes from transport layer and form an RPC frame\r
- *\r
- * @param   none\r
- *\r
- * @return  length of current Rx Buffer\r
- *************************************************************************************************/\r
-int32_t rpcProcess(void)\r
-{\r
-       uint8_t rpcLen, rpcTempLen, bytesRead, sofByte, rpcBuffIdx;\r
-       uint8_t retryAttempts = 0, len, rpcBuff[RPC_MAX_LEN];\r
-\r
-#ifndef HAL_UART_IP //No SOF for IP\r   //read first byte and check it is a SOF\r
-       bytesRead = rpcTransportRead(&sofByte, 1);\r
-\r
-       if ((sofByte == MT_RPC_SOF) && (bytesRead == 1))\r
-#endif\r
-       {\r
-               // clear retry counter\r
-               retryAttempts = 0;\r
-\r
-               // read length byte\r
-               bytesRead = rpcTransportRead(&rpcLen, 1);\r
-\r
-               if (bytesRead == 1)\r
-               {\r
-                       len = rpcLen;\r
-\r
-#ifdef HAL_UART_IP //No FCS for IP\r                    //allocating RPC payload (+ cmd0, cmd1)\r
-                       rpcLen += RPC_CMD0_FIELD_LEN + RPC_CMD1_FIELD_LEN;\r
-#else\r
-                       //allocating RPC payload (+ cmd0, cmd1 and fcs)\r
-                       rpcLen +=\r
-                               RPC_CMD0_FIELD_LEN + RPC_CMD1_FIELD_LEN + RPC_UART_FCS_LEN;\r
-#endif\r
-\r
-                       //non blocking read, so we need to wait for the rpc to be read\r
-                       rpcBuffIdx = 0;\r
-                       rpcTempLen = rpcLen;\r
-                       while (rpcTempLen > 0)\r
-                       {\r
-                               // read RPC frame\r
-                               bytesRead = rpcTransportRead(&(rpcBuff[rpcBuffIdx]),\r
-                                       rpcTempLen);\r
-\r
-                               // check for error\r
-                               if (bytesRead > rpcTempLen)\r
-                               {\r
-                                       //there was an error\r
-                                       dbg_print(PRINT_LEVEL_WARNING,\r
-                                               "rpcProcess: read of %d bytes failed - %s\n",\r
-                                               rpcTempLen, strerror(errno));\r
-\r
-                                       // check whether retry limits has been reached\r
-                                       if (retryAttempts++ < 5)\r
-                                       {\r
-                                               // sleep for 10ms\r
-                                               usleep(10000);\r
-\r
-                                               // try again\r
-                                               bytesRead = 0;\r
-                                       }\r
-                                       else\r
-                                       {\r
-                                               // something went wrong, abort\r
-                                               dbg_print(PRINT_LEVEL_ERROR,\r
-                                                       "rpcProcess: transport read failed too many times\n");\r
-\r
-                                               return -1;\r
-                                       }\r
-                               }\r
-\r
-                               // update counters\r
-                               if (rpcTempLen > bytesRead)\r
-                               {\r
-                                       rpcTempLen -= bytesRead;\r
-                               }\r
-                               else\r
-                               {\r
-                                       rpcTempLen = 0;\r
-                               }\r
-                               rpcBuffIdx += bytesRead;\r
-                       }\r
-\r
-                       // print out incoming RPC frame\r
-                       printRpcMsg("SOC IN  <--", MT_RPC_SOF, len, rpcBuff);\r
-\r
-                       // TODO: verify FCS of incoming MT frames\r
-\r
-                       if ((rpcBuff[0] & MT_RPC_CMD_TYPE_MASK) == MT_RPC_CMD_SRSP)\r
-                       {\r
-                               // SRSP command ID deteced\r
-                               if (expectedSrspCmdId == (rpcBuff[0] & MT_RPC_SUBSYSTEM_MASK))\r
-                               {\r
-                                       dbg_print(PRINT_LEVEL_INFO,\r
-                                               "rpcProcess: processing expected srsp [%02X]\n",\r
-                                               rpcBuff[0] & MT_RPC_SUBSYSTEM_MASK);\r
-\r
-                                       //unblock waiting sreq\r
-                                       sem_post(&srspSem);\r
-\r
-                                       dbg_print(PRINT_LEVEL_INFO,\r
-                                               "rpcProcess: writing %d bytes SRSP to head of the queue\n",\r
-                                               rpcLen);\r
-\r
-                                       // send message to queue\r
-                                       addToHead(&rpcQueue, rpcBuff, rpcLen);//mq_send(rpcQueue, (char*) rpcBuff, rpcLen, 1);\r
-                                       //printf("------------>>>>>>>>>>>QUEUEUE %d",rpcQueue.head->data[0]);\r
-                               }\r
-                               else\r
-                               {\r
-                                       // unexpected SRSP discard\r
-                                       dbg_print(PRINT_LEVEL_WARNING,\r
-                                               "rpcProcess: UNEXPECTED SREQ!: %02X%s:%02X%s",\r
-                                               expectedSrspCmdId,\r
-                                               (rpcBuff[0] & MT_RPC_SUBSYSTEM_MASK));\r
-                                       return 0;\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               // should be AREQ frame\r
-                               dbg_print(PRINT_LEVEL_INFO,\r
-                                       "rpcProcess: writing %d bytes AREQ to tail of the que\n",\r
-                                       rpcLen);\r
-\r
-                               // send message to queue\r
-                               addToTail(&rpcQueue, rpcBuff, rpcLen);//mq_send(rpcQueue, (char*) rpcBuff, rpcLen, 0);\r
-                       }\r
-\r
-                       return 0;\r
-               }\r
-               else\r
-               {\r
-                       dbg_print(PRINT_LEVEL_WARNING, "rpcProcess: Len Not read [%x]\n",\r
-                               bytesRead);\r
-               }\r
-       }\r
-       else\r
-       {\r
-               dbg_print(PRINT_LEVEL_WARNING,\r
-                       "rpcProcess: No valid Start Of Frame found [%x:%x]\n", sofByte,\r
-                       bytesRead);\r
-       }\r
-\r
-       return -1;\r
-}\r
-\r
-/*************************************************************************************************\r
- * @fn      sendRpcFrame()\r
- *\r
- * @brief   builds the Frame and sends it to the transport layer - usually called by the\r
- *          application thread(s)\r
- *\r
- * @param   cmd0 System, cmd1 subsystem, ptr to payload, lenght of payload\r
- *\r
- * @return  length of current Rx Buffer\r
- *************************************************************************************************/\r
-uint8_t rpcSendFrame(uint8_t cmd0, uint8_t cmd1, uint8_t *payload,\r
-        uint8_t payload_len)\r
-{\r
-       uint8_t buf[RPC_MAX_LEN];\r
-       int32_t status = MT_RPC_SUCCESS;\r
-\r
-       // block here if SREQ is in progress\r
-       dbg_print(PRINT_LEVEL_INFO, "rpcSendFrame: Blocking on RPC sem\n");\r
-       sem_wait(&rpcSem);\r
-       dbg_print(PRINT_LEVEL_INFO, "rpcSendFrame: Sending RPC\n");\r
-\r
-       // fill in header bytes\r
-       buf[0] = MT_RPC_SOF;\r
-       buf[1] = payload_len;\r
-       buf[2] = cmd0;\r
-       buf[3] = cmd1;\r
-\r
-       if ((cmd0 & MT_RPC_CMD_TYPE_MASK) == MT_RPC_CMD_SREQ)\r
-       {\r
-               // calculate expected SRSP\r
-               expectedSrspCmdId = (cmd0 & MT_RPC_SUBSYSTEM_MASK);\r
-       }\r
-\r
-       if (payload_len > 0)\r
-       {\r
-               // copy payload to buffer\r
-               memcpy(buf + RPC_UART_HDR_LEN, payload, payload_len);\r
-       }\r
-\r
-       // calculate FCS field\r
-       buf[payload_len + RPC_UART_HDR_LEN] = calcFcs(\r
-               &buf[RPC_UART_FRAME_START_IDX], payload_len + RPC_HDR_LEN);\r
-\r
-#ifdef HAL_UART_IP\r
-       // No SOF or FCS\r
-       rpcTransportWrite(buf+1, payload_len + RPC_HDR_LEN + RPC_UART_FCS_LEN);\r
-#else\r
-       // send out RPC  message\r
-       rpcTransportWrite(buf, payload_len + RPC_UART_HDR_LEN + RPC_UART_FCS_LEN);\r
-#endif\r
-\r
-       // print out message to be sent\r
-       printRpcMsg("SOC OUT -->", buf[0], payload_len, &buf[2]);\r
-\r
-       // wait for SRSP if necessary\r
-       if ((cmd0 & MT_RPC_CMD_TYPE_MASK) == MT_RPC_CMD_SREQ)\r
-       {\r
-               // calculate timeout\r
-               struct timespec srspTimeOut =\r
-                       { time(0) + (SRSP_TIMEOUT_MS / 1000), (long) ((long) SRSP_TIMEOUT_MS\r
-                               % 1000) * 1000000 };\r
-\r
-               dbg_print(PRINT_LEVEL_INFO, "rpcSendFrame: waiting for SRSP [%02x]\n",\r
-                       expectedSrspCmdId);\r
-\r
-               //Wait for the SRSP\r
-               status = sem_timedwait(&srspSem, &srspTimeOut);\r
-               if (status == -1)\r
-               {\r
-                       dbg_print(PRINT_LEVEL_WARNING, "rpcSendFrame: SRSP Error - %x\n",\r
-                               expectedSrspCmdId);\r
-                       status = MT_RPC_ERR_SUBSYSTEM;\r
-               }\r
-               else\r
-               {\r
-                       dbg_print(PRINT_LEVEL_INFO, "rpcSendFrame: Receive SRSP\n");\r
-                       status = MT_RPC_SUCCESS;\r
-               }\r
-\r
-               //set expected SRSP to invalid\r
-               expectedSrspCmdId = 0xFF;\r
-       }\r
-\r
-       //Unlock RPC sem\r
-       sem_post(&rpcSem);\r
-\r
-       return status;\r
-}\r
-\r
-/*********************************************************************\r
- * LOCAL FUNCTIONS\r
- */\r
-\r
-/*********************************************************************\r
- * @fn      calcFcs\r
- *\r
- * @brief   calculate the FCS (Frame Check Sequence) of the RPC payload.\r
- *\r
- * @param   msg  - pointer to the RPC general format frame message\r
- * @param   size - RPC general format frame size\r
- *\r
- * @return  FCS value\r
- */\r
-static uint8_t calcFcs(uint8_t *msg, uint8_t size)\r
-{\r
-       uint8_t result = 0;\r
-\r
-       // calculate FCS by XORing all bytes\r
-       while (size--)\r
-       {\r
-               result ^= *msg++;\r
-       }\r
-\r
-       return result;\r
-}\r
-\r
-/*********************************************************************\r
- * @fn      printRpcMsg\r
- *\r
- * @brief   print out RPC message\r
- *\r
- * @param   preMsg - initial string\r
- * @param   sof - SOF (Start of Frame) bytes\r
- * @param   len - length byte\r
- * @param   msg  - pointer to the RPC message starting from Cmd0 byte\r
- *\r
- * @return  FCS value\r
- */\r
-static void printRpcMsg(char* preMsg, uint8_t sof, uint8_t len, uint8_t *msg)\r
-{\r
-       uint8_t i;\r
-\r
-       // print headers\r
-       dbg_print(PRINT_LEVEL_INFO_LOWLEVEL,\r
-               "%s %d Bytes: SOF:%02X, Len:%02X, CMD0:%02X, CMD1:%02X, Payload:",\r
-               preMsg, len + 5, sof, len, msg[0], msg[1]);\r
-\r
-       // print frame payload\r
-       for (i = 2; i < len + 2; i++)\r
-       {\r
-               dbg_print(PRINT_LEVEL_INFO_LOWLEVEL, "%02X%s", msg[i],\r
-                       i < (len + 2 - 1) ? ":" : ",");\r
-       }\r
-\r
-       // print FCS\r
-       dbg_print(PRINT_LEVEL_INFO_LOWLEVEL, " FCS:%02X\n", msg[i]);\r
-\r
-}\r
diff --git a/framework/rpcWindows/rpc.h b/framework/rpcWindows/rpc.h
deleted file mode 100644 (file)
index c47781b..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*\r
- * rpc.h\r
- *\r
- * This module contains the RPC (Remote Procedure Call) API for the\r
- * ZigBee Network Processor (ZNP) Host Interface.\r
- *\r
- * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/\r
- * \r
- * \r
- *  Redistribution and use in source and binary forms, with or without \r
- *  modification, are permitted provided that the following conditions \r
- *  are met:\r
- *\r
- *    Redistributions of source code must retain the above copyright \r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- *    Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the \r
- *    documentation and/or other materials provided with the   \r
- *    distribution.\r
- *\r
- *    Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *\r
- */\r
-\r
-#ifndef RPC_H\r
-#define RPC_H\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
-/***********************************************************************************\r
- * INCLUDES\r
- */\r
-#include <stdint.h>\r
-\r
-/*********************************************************************\r
- * MACROS\r
- */\r
-\r
-/*********************************************************************\r
- * CONSTANTS\r
- */\r
-\r
-//\r
-// RPC (Remote Procedure Call) definitions\r
-//\r
-// SOF (Start of Frame) indicator byte byte\r
-#define MT_RPC_SOF                 (0xFE)\r
-\r
-// The 3 MSB's of the 1st command field byte (Cmd0) are for command type\r
-#define MT_RPC_CMD_TYPE_MASK       (0xE0)\r
-\r
-// The 5 LSB's of the 1st command field byte (Cmd0) are for the subsystem\r
-#define MT_RPC_SUBSYSTEM_MASK      (0x1F)\r
-\r
-// maximum length of RPC frame\r
-// (1 byte length + 2 bytes command + 0-250 bytes data)\r
-#define RPC_MAX_LEN                (256)\r
-\r
-// RPC Frame field lengths\r
-#define RPC_UART_SOF_LEN           (1)\r
-#define RPC_UART_FCS_LEN           (1)\r
-\r
-#define RPC_UART_FRAME_START_IDX   (1)\r
-\r
-#define RPC_LEN_FIELD_LEN          (1)\r
-#define RPC_CMD0_FIELD_LEN         (1)\r
-#define RPC_CMD1_FIELD_LEN         (1)\r
-\r
-#define RPC_HDR_LEN                (RPC_LEN_FIELD_LEN + RPC_CMD0_FIELD_LEN + \\r
-                                           RPC_CMD1_FIELD_LEN)\r
-\r
-#define RPC_UART_HDR_LEN           (RPC_UART_SOF_LEN + RPC_HDR_LEN)\r
-\r
-/***********************************************************************************\r
- * TYPEDEFS\r
- */\r
-\r
-// Cmd0 Command Type\r
-typedef enum\r
-{\r
-       MT_RPC_CMD_POLL = 0x00,  // POLL command\r
-       MT_RPC_CMD_SREQ = 0x20,  // SREQ (Synchronous Request) command\r
-       MT_RPC_CMD_AREQ = 0x40,  // AREQ (Acynchronous Request) command\r
-       MT_RPC_CMD_SRSP = 0x60,  // SRSP (Synchronous Response)\r
-       MT_RPC_CMD_RES4 = 0x80,  // Reserved\r
-       MT_RPC_CMD_RES5 = 0xA0,  // Reserved\r
-       MT_RPC_CMD_RES6 = 0xC0,  // Reserved\r
-       MT_RPC_CMD_RES7 = 0xE0   // Reserved\r
-} mtRpcCmdType_t;\r
-\r
-// Cmd0 Command Subsystem\r
-typedef enum\r
-{\r
-       MT_RPC_SYS_RES0,   // Reserved.\r
-       MT_RPC_SYS_SYS,    // SYS interface\r
-       MT_RPC_SYS_MAC,\r
-       MT_RPC_SYS_NWK,\r
-       MT_RPC_SYS_AF,     // AF interface\r
-       MT_RPC_SYS_ZDO,    // ZDO interface\r
-       MT_RPC_SYS_SAPI,   // Simple API interface\r
-       MT_RPC_SYS_UTIL,   // UTIL interface\r
-       MT_RPC_SYS_DBG,\r
-       MT_RPC_SYS_APP,\r
-       MT_RPC_SYS_OTA,\r
-       MT_RPC_SYS_ZNP,\r
-       MT_RPC_SYS_SPARE_12,\r
-       MT_RPC_SYS_SBL = 13, // 13 to be compatible with existing RemoTI - AKA MT_RPC_SYS_UBL\r
-       MT_RPC_SYS_MAX // Maximum value, must be last (so 14-32 available, not yet assigned).\r
-} mtRpcSysType_t;\r
-\r
-// Error codes in Attribute byte of SRSP packet\r
-typedef enum\r
-{\r
-       MT_RPC_SUCCESS = 0,         // success\r
-       MT_RPC_ERR_SUBSYSTEM = 1,   // invalid subsystem\r
-       MT_RPC_ERR_COMMAND_ID = 2,  // invalid command ID\r
-       MT_RPC_ERR_PARAMETER = 3,   // invalid parameter\r
-       MT_RPC_ERR_LENGTH = 4       // invalid length\r
-} mtRpcErrorCode_t;\r
-\r
-/***********************************************************************************\r
- * GLOBAL VARIABLES\r
- */\r
-\r
-/***********************************************************************************\r
- * GLOBAL FUNCTIONS\r
- */\r
-\r
-int32_t rpcOpen(char *devicePath, uint32_t port);\r
-void rpcClose(void);\r
-int32_t rpcProcess(void);\r
-uint8_t rpcSendFrame(uint8_t cmd0, uint8_t cmd1, uint8_t * payload,\r
-        uint8_t payload_len);\r
-void rpcForceRun(void);\r
-int32_t rpcInitMq(void);\r
-int32_t rpcGetMqClientMsg(void);\r
-int32_t rpcWaitMqClientMsg(uint32_t timeout);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif /* RPC_H */\r