diff options
author | siddhu8990 | 2015-09-07 23:06:39 +0530 |
---|---|---|
committer | siddhu8990 | 2015-09-07 23:06:39 +0530 |
commit | 895d4d14a2b7e71435c4257cbd4f2253550a0b82 (patch) | |
tree | aa7fc22b1b4e4dc1c9229389457317777e759dbb /macros | |
parent | a6bf6562c74bb0117cc2f59f34cf49a24b6cb6b9 (diff) | |
parent | 0bdaec9811b3e463514393aa1d3da6c3a96891a1 (diff) | |
download | scilab2c-895d4d14a2b7e71435c4257cbd4f2253550a0b82.tar.gz scilab2c-895d4d14a2b7e71435c4257cbd4f2253550a0b82.tar.bz2 scilab2c-895d4d14a2b7e71435c4257cbd4f2253550a0b82.zip |
Scilab to arduino conversion working with some tweaks
Diffstat (limited to 'macros')
21 files changed, 116 insertions, 6 deletions
diff --git a/macros/CCodeGeneration/C_GenerateMakefile.bin b/macros/CCodeGeneration/C_GenerateMakefile.bin Binary files differindex 59529769..557abfda 100644 --- a/macros/CCodeGeneration/C_GenerateMakefile.bin +++ b/macros/CCodeGeneration/C_GenerateMakefile.bin diff --git a/macros/CCodeGeneration/C_Type.bin b/macros/CCodeGeneration/C_Type.bin Binary files differindex a18a4112..7cdfa084 100644 --- a/macros/CCodeGeneration/C_Type.bin +++ b/macros/CCodeGeneration/C_Type.bin diff --git a/macros/ToolInitialization/INIT_CreateDirs.bin b/macros/ToolInitialization/INIT_CreateDirs.bin Binary files differindex 2d1a99bd..43e37190 100644 --- a/macros/ToolInitialization/INIT_CreateDirs.bin +++ b/macros/ToolInitialization/INIT_CreateDirs.bin diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 44907b8f..eafc416a 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -3753,6 +3753,31 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex //------------------------------------
+//---- Class cmd_digital_out ---------
+//------------------------------------
+ClassName = 'cmd_digital_out';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_digital_out';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
//---- Class cmd_digital_in ----------
//------------------------------------
ClassName = 'cmd_digital_in';
@@ -3760,6 +3785,30 @@ ClassName = 'cmd_digital_in'; // --- Class Annotation. ---
PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_digital_in';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_analog_out ----------
+//------------------------------------
+ClassName = 'cmd_analog_out';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
PrintStringInfo('NIN= 3',ClassFileName,'file','y');
PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
@@ -3768,10 +3817,59 @@ PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. ---
ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
-PrintStringInfo('d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
-FunctionName = 'cmd_digital_out';
+FunctionName = 'cmd_analog_out';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_analog_in -----------
+//------------------------------------
+ClassName = 'cmd_analog_in';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_analog_in';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class Sleep -------------------
+//------------------------------------
+ClassName = 'sleep';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sleep';
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
diff --git a/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin b/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin Binary files differindex 5a434384..458622b6 100644 --- a/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin +++ b/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin diff --git a/macros/ToolInitialization/INIT_GenFileInfo.bin b/macros/ToolInitialization/INIT_GenFileInfo.bin Binary files differindex 771bad76..8e463bb4 100644 --- a/macros/ToolInitialization/INIT_GenFileInfo.bin +++ b/macros/ToolInitialization/INIT_GenFileInfo.bin diff --git a/macros/ToolInitialization/INIT_GenLibraries.bin b/macros/ToolInitialization/INIT_GenLibraries.bin Binary files differindex e5a6dd8e..7ab0790d 100644 --- a/macros/ToolInitialization/INIT_GenLibraries.bin +++ b/macros/ToolInitialization/INIT_GenLibraries.bin diff --git a/macros/ToolInitialization/INIT_GenSharedInfo.bin b/macros/ToolInitialization/INIT_GenSharedInfo.bin Binary files differindex 08a1b5af..7a10c806 100644 --- a/macros/ToolInitialization/INIT_GenSharedInfo.bin +++ b/macros/ToolInitialization/INIT_GenSharedInfo.bin diff --git a/macros/ToolInitialization/INIT_LoadLibraries.bin b/macros/ToolInitialization/INIT_LoadLibraries.bin Binary files differindex fef3558e..70755727 100644 --- a/macros/ToolInitialization/INIT_LoadLibraries.bin +++ b/macros/ToolInitialization/INIT_LoadLibraries.bin diff --git a/macros/ToolInitialization/INIT_RemoveDirs.bin b/macros/ToolInitialization/INIT_RemoveDirs.bin Binary files differindex e8c2a050..036d7e56 100644 --- a/macros/ToolInitialization/INIT_RemoveDirs.bin +++ b/macros/ToolInitialization/INIT_RemoveDirs.bin diff --git a/macros/ToolInitialization/INIT_SCI2C.bin b/macros/ToolInitialization/INIT_SCI2C.bin Binary files differindex acf8236c..290fb65b 100644 --- a/macros/ToolInitialization/INIT_SCI2C.bin +++ b/macros/ToolInitialization/INIT_SCI2C.bin diff --git a/macros/ToolInitialization/INIT_SharedInfoEqual.bin b/macros/ToolInitialization/INIT_SharedInfoEqual.bin Binary files differindex 72dbd5b7..af425024 100644 --- a/macros/ToolInitialization/INIT_SharedInfoEqual.bin +++ b/macros/ToolInitialization/INIT_SharedInfoEqual.bin diff --git a/macros/ToolInitialization/ManageNextConversion.bin b/macros/ToolInitialization/ManageNextConversion.bin Binary files differindex ba4cf85f..c1ed0bb9 100644 --- a/macros/ToolInitialization/ManageNextConversion.bin +++ b/macros/ToolInitialization/ManageNextConversion.bin diff --git a/macros/ToolInitialization/UpdateSCI2CInfo.bin b/macros/ToolInitialization/UpdateSCI2CInfo.bin Binary files differindex 8b62bd72..bff93a9d 100644 --- a/macros/ToolInitialization/UpdateSCI2CInfo.bin +++ b/macros/ToolInitialization/UpdateSCI2CInfo.bin diff --git a/macros/findDeps/getAllHeaders.bin b/macros/findDeps/getAllHeaders.bin Binary files differindex 7d24b150..d6025544 100644 --- a/macros/findDeps/getAllHeaders.bin +++ b/macros/findDeps/getAllHeaders.bin diff --git a/macros/findDeps/getAllHeaders.sci b/macros/findDeps/getAllHeaders.sci index 07bb8baf..9ae5b257 100644 --- a/macros/findDeps/getAllHeaders.sci +++ b/macros/findDeps/getAllHeaders.sci @@ -125,5 +125,9 @@ function allHeaders = getAllHeaders() "src/c/signalProcessing/includes/crossCorr.h" "src/c/implicitList/dynlib_implicitlist.h" "src/c/implicitList/implicitList.h" - "src/c/scilab-arduino/includes/cmd_digital_out.h"]; + "src/c/scilab-arduino/includes/cmd_digital_out.h" + "src/c/scilab-arduino/includes/cmd_digital_in.h" + "src/c/scilab-arduino/includes/cmd_analog_out.h" + "src/c/scilab-arduino/includes/cmd_analog_in.h" + "src/c/scilab-arduino/includes/sleep.h"]; endfunction diff --git a/macros/findDeps/getAllInterfaces.bin b/macros/findDeps/getAllInterfaces.bin Binary files differindex e9133b65..a6a81ce5 100644 --- a/macros/findDeps/getAllInterfaces.bin +++ b/macros/findDeps/getAllInterfaces.bin diff --git a/macros/findDeps/getAllInterfaces.sci b/macros/findDeps/getAllInterfaces.sci index d6be456a..b32f9d5f 100644 --- a/macros/findDeps/getAllInterfaces.sci +++ b/macros/findDeps/getAllInterfaces.sci @@ -119,5 +119,9 @@ function allInterfaces = getAllInterfaces() "src/c/signalProcessing/interfaces/int_fft.h" "src/c/signalProcessing/interfaces/int_lev.h" "src/c/implicitList/int_OpColon.h" - "src/c/scilab-arduino/interfaces/int_cmd_digital_out.h"]; + "src/c/scilab-arduino/interfaces/int_cmd_digital_out.h" + "src/c/scilab-arduino/interfaces/int_cmd_digital_in.h" + "src/c/scilab-arduino/interfaces/int_cmd_analog_out.h" + "src/c/scilab-arduino/interfaces/int_cmd_analog_in.h" + "src/c/scilab-arduino/interfaces/int_sleep.h"]; endfunction diff --git a/macros/findDeps/getAllSources.bin b/macros/findDeps/getAllSources.bin Binary files differindex 1d756fb2..5e153872 100644 --- a/macros/findDeps/getAllSources.bin +++ b/macros/findDeps/getAllSources.bin diff --git a/macros/findDeps/getAllSources.sci b/macros/findDeps/getAllSources.sci index e0f849c0..c33346f5 100644 --- a/macros/findDeps/getAllSources.sci +++ b/macros/findDeps/getAllSources.sci @@ -815,5 +815,9 @@ function allSources = getAllSources() "src/c/implicitList/dimplicitLists.c" "src/c/implicitList/cimplicitLists.c" "src/c/implicitList/simplicitLists.c" - "src/c/scialb-arduino/cmd_digital_out/u8cmd_digital_outs.c"]; + "src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c" + "src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c" + "src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c" + "src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c" + "src/c/scilab-arduino/sleep/u16sleeps.c"]; endfunction diff --git a/macros/runsci2c.sci b/macros/runsci2c.sci index fbdad316..08a2700b 100644 --- a/macros/runsci2c.sci +++ b/macros/runsci2c.sci @@ -104,7 +104,7 @@ mkdir(SCI2COutputPath+"/interfaces/"); PrintStepInfo('Copying sources', FileInfo.GeneralReport,'both');
for i = 1:size(allSources, "*")
// DEBUG only
- //disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
+ disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
copyfile(allSources(i), SCI2COutputPath+"/src/c/");
end
|