summaryrefslogtreecommitdiff
path: root/2.3-1/macros/ToolInitialization
diff options
context:
space:
mode:
authorsiddhu89902015-12-17 14:48:36 +0530
committersiddhu89902015-12-23 11:26:29 +0530
commit66ae4f251032aca6b7063353beee6c387a58418e (patch)
treea474f509f6413acb4593a43c371a4406d9400957 /2.3-1/macros/ToolInitialization
parenteac39cdc77ad5fdaf7b245cbce5c92f105ac75bf (diff)
downloadScilab2C-66ae4f251032aca6b7063353beee6c387a58418e.tar.gz
Scilab2C-66ae4f251032aca6b7063353beee6c387a58418e.tar.bz2
Scilab2C-66ae4f251032aca6b7063353beee6c387a58418e.zip
Code generation for Arduino changed. DC motor added to Arduino.
Diffstat (limited to '2.3-1/macros/ToolInitialization')
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.binbin932856 -> 950836 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci101
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenFileInfo.binbin19356 -> 19628 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci2
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_LoadLibraries.binbin8844 -> 8940 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci2
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.binbin23840 -> 24408 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.sci9
-rw-r--r--2.3-1/macros/ToolInitialization/ManageNextConversion.binbin11012 -> 11016 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/ManageNextConversion.sci1
10 files changed, 111 insertions, 4 deletions
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
index f790c5e8..be0c48fb 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index c6423531..c3981a49 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -3952,6 +3952,56 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
//------------------------------------
+//---- Class cmd_dcmotor_setup -------
+//------------------------------------
+ClassName = 'cmd_dcmotor_setup';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 5',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('d0d0d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_dcmotor_setup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_dcmotor_run -------
+//------------------------------------
+ClassName = 'cmd_dcmotor_run';
+
+// --- 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');
+PrintStringInfo('d0d0i160'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_dcmotor_run';
+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';
@@ -4109,6 +4159,57 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---- Class AVRPWMSetup -------------
+//------------------------------------
+ClassName = 'AVRPWMSetup';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 4',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('d0d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWMSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class AVRPWMSetDuty -----------
+//------------------------------------
+ClassName = 'AVRPWMSetDuty';
+
+// --- 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 = 'AVRPWMSetDuty';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
// ////////////////////////////////////////////
// /////PARTE INTRODOTTA DA ALBERTO MOREA
// /////////////////////////////////////////////
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.bin b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.bin
index 8f114a72..a8d47222 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci
index 753509e3..21fe7a72 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci
@@ -113,5 +113,5 @@ FileInfo.MakefileFilename = fullfile(FileInfo.CStyleOutCCCodeDir,'Makefile');
//----Hardware related-----
//-------------------------
FileInfo.PeripheralInitListFile = fullfile(FileInfo.WorkingDir,'PeripheralInit.dat');
-
+FileInfo.SetupListFile = fullfile(FileInfo.WorkingDir,'SetupList.dat');
endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.bin b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.bin
index 4cf02836..c85aac6e 100644
--- a/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci
index 1ef9ee00..28eb34f5 100644
--- a/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci
@@ -49,7 +49,7 @@ ToBeConverted(1).CFunctionName = SharedInfo.NextCFunName;
// --- Read the list of library functions available. ---
[SCI2CAvailableC,SCI2CNElem] = FL_ExtractFuncList(FileInfo.SCI2CLibCFLFun,FileInfo.SCI2CLibCFLCls,...
SharedInfo.Annotations.FUNCLASS,SharedInfo.Extension.FuncListClasses,FileInfo.GeneralReport);
-
+//disp (SCI2CAvailable);
[USER2CAvailableC,USER2CNElem] = FL_ExtractFuncList(FileInfo.USER2CLibCFLFun,FileInfo.USER2CLibCFLCls,...
SharedInfo.Annotations.FUNCLASS,SharedInfo.Extension.FuncListClasses,FileInfo.GeneralReport);
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin b/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
index 72623b28..c6141d61 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
index 0340d6ff..6dde05de 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
@@ -147,8 +147,13 @@ anscounter = 0;
//--------------------------------------------
//---Hardware related initialisation----------
//--------------------------------------------
-PeripheralList = list();
-save(FileInfo.PeripheralInitListFile, 'PeripheralList');
+if (OutFormat == 'AVR')
+ PeripheralList = list();
+ save(FileInfo.PeripheralInitListFile, 'PeripheralList');
+elseif (OutFormat == 'Arduino')
+ SetupList = list();
+ save(FileInfo.SetupListFile, 'SetupList');
+end
endfunction
// #RNU_RES_B
diff --git a/2.3-1/macros/ToolInitialization/ManageNextConversion.bin b/2.3-1/macros/ToolInitialization/ManageNextConversion.bin
index a34ee4f6..bf43562a 100644
--- a/2.3-1/macros/ToolInitialization/ManageNextConversion.bin
+++ b/2.3-1/macros/ToolInitialization/ManageNextConversion.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/ManageNextConversion.sci b/2.3-1/macros/ToolInitialization/ManageNextConversion.sci
index 04ec9dbc..a1524766 100644
--- a/2.3-1/macros/ToolInitialization/ManageNextConversion.sci
+++ b/2.3-1/macros/ToolInitialization/ManageNextConversion.sci
@@ -49,6 +49,7 @@ C_FinalizeCode(FileInfo,SharedInfo);
// --- Identify the next function to translate. ---
// ------------------------------------------------
SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate - 1;
+
if (SharedInfo.NFilesToTranslate >= 1)
// Remove the translated C function from the ToBeConverted list
ToBeConverted(1) = [];