summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/ASTManagement/AST_HandleEndGenFun.binbin92828 -> 93256 bytes
-rw-r--r--macros/ASTManagement/AST_HandleEndGenFun.sci3
-rw-r--r--macros/CCodeGeneration/C_GenerateMakefile.binbin28780 -> 30200 bytes
-rw-r--r--macros/CCodeGeneration/C_GenerateMakefile.sci26
-rw-r--r--macros/CCodeGeneration/C_Type.binbin5564 -> 5740 bytes
-rw-r--r--macros/CCodeGeneration/C_Type.sci2
-rw-r--r--macros/FunctionAnnotation/FA_GetDefaultPrecision.binbin11192 -> 11384 bytes
-rw-r--r--macros/FunctionAnnotation/FA_GetDefaultPrecision.sci2
-rw-r--r--macros/FunctionAnnotation/FA_GetFunAnn.binbin30684 -> 30680 bytes
-rw-r--r--macros/FunctionAnnotation/FA_GetFunAnn.sci1
-rw-r--r--macros/FunctionAnnotation/FA_TP_CVIMAGE.binbin0 -> 2924 bytes
-rw-r--r--macros/FunctionAnnotation/FA_TP_CVIMAGE.sci30
-rw-r--r--macros/FunctionAnnotation/FA_TP_INT16.binbin2888 -> 2888 bytes
-rw-r--r--macros/FunctionAnnotation/FA_TP_INT16.sci2
-rw-r--r--macros/FunctionAnnotation/libbin2204 -> 2228 bytes
-rw-r--r--macros/FunctionAnnotation/names1
-rw-r--r--macros/Hardware/RasberryPi/GetRPISupportFunctions.binbin2784 -> 3184 bytes
-rw-r--r--macros/Hardware/RasberryPi/GetRPISupportFunctions.sci4
-rw-r--r--macros/Hardware/RasberryPi/RPI_DigitalSetup.binbin4884 -> 4964 bytes
-rw-r--r--macros/Hardware/RasberryPi/RPI_DigitalSetup.sci3
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMSetClock.binbin0 -> 3488 bytes
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci27
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMSetMode.binbin0 -> 2448 bytes
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci24
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMSetRange.binbin0 -> 3340 bytes
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci27
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMWrite.binbin0 -> 4628 bytes
-rw-r--r--macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci31
-rw-r--r--macros/Hardware/RasberryPi/RPI_SerialGetChar.binbin3400 -> 3404 bytes
-rw-r--r--macros/Hardware/RasberryPi/RPI_SerialGetChar.sci2
-rw-r--r--macros/Hardware/RasberryPi/libbin1056 -> 1152 bytes
-rw-r--r--macros/Hardware/RasberryPi/names4
-rw-r--r--macros/ImageProcessing/CV_CreateImage.binbin0 -> 3564 bytes
-rw-r--r--macros/ImageProcessing/CV_CreateImage.sci41
-rw-r--r--macros/ImageProcessing/buildmacros.sce30
-rw-r--r--macros/ImageProcessing/core/CV_CreateImage.binbin0 -> 3564 bytes
-rw-r--r--macros/ImageProcessing/core/CV_CreateImage.sci30
-rw-r--r--macros/ImageProcessing/core/buildmacros.sce15
-rw-r--r--macros/ImageProcessing/core/libbin0 -> 676 bytes
-rw-r--r--macros/ImageProcessing/core/names1
-rw-r--r--macros/ImageProcessing/highgui/CV_LoadImage.binbin0 -> 2996 bytes
-rw-r--r--macros/ImageProcessing/highgui/CV_LoadImage.sci41
-rw-r--r--macros/ImageProcessing/highgui/CV_SaveImage.binbin0 -> 2732 bytes
-rw-r--r--macros/ImageProcessing/highgui/CV_SaveImage.sci39
-rw-r--r--macros/ImageProcessing/highgui/CV_ShowImage.binbin0 -> 2592 bytes
-rw-r--r--macros/ImageProcessing/highgui/CV_ShowImage.sci40
-rw-r--r--macros/ImageProcessing/highgui/CV_WaitKey.binbin0 -> 2528 bytes
-rw-r--r--macros/ImageProcessing/highgui/CV_WaitKey.sci40
-rw-r--r--macros/ImageProcessing/highgui/buildmacros.sce15
-rw-r--r--macros/ImageProcessing/highgui/libbin0 -> 760 bytes
-rw-r--r--macros/ImageProcessing/highgui/names4
-rw-r--r--macros/ImageProcessing/libbin0 -> 656 bytes
-rw-r--r--macros/ImageProcessing/names1
-rw-r--r--macros/SymbolTable/ST_AnalyzeScope.binbin16788 -> 16792 bytes
-rw-r--r--macros/SymbolTable/ST_AnalyzeScope.sci1
-rw-r--r--macros/SymbolTable/ST_InsOutArg.binbin32432 -> 33612 bytes
-rw-r--r--macros/SymbolTable/ST_InsOutArg.sci10
-rw-r--r--macros/ToolInitialization/INIT_FillSCI2LibCDirs.binbin1207028 -> 1236688 bytes
-rw-r--r--macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci231
-rw-r--r--macros/ToolInitialization/INIT_GenSharedInfo.binbin20712 -> 21060 bytes
-rw-r--r--macros/ToolInitialization/INIT_GenSharedInfo.sci3
-rw-r--r--macros/buildmacros.sce9
-rw-r--r--macros/findDeps/getAllHeaders.binbin31412 -> 32576 bytes
-rw-r--r--macros/findDeps/getAllHeaders.sci12
-rw-r--r--macros/findDeps/getAllInterfaces.binbin32640 -> 33876 bytes
-rw-r--r--macros/findDeps/getAllInterfaces.sci12
-rw-r--r--macros/findDeps/getAllLibraries.binbin1952 -> 2076 bytes
-rw-r--r--macros/findDeps/getAllLibraries.sci5
-rw-r--r--macros/findDeps/getAllSources.binbin191264 -> 193416 bytes
-rw-r--r--macros/findDeps/getAllSources.sci18
-rw-r--r--macros/runsci2c.binbin30892 -> 30896 bytes
-rw-r--r--macros/runsci2c.sci12
72 files changed, 724 insertions, 75 deletions
diff --git a/macros/ASTManagement/AST_HandleEndGenFun.bin b/macros/ASTManagement/AST_HandleEndGenFun.bin
index 4da5775..123ff51 100644
--- a/macros/ASTManagement/AST_HandleEndGenFun.bin
+++ b/macros/ASTManagement/AST_HandleEndGenFun.bin
Binary files differ
diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci
index de5ae80..df4334f 100644
--- a/macros/ASTManagement/AST_HandleEndGenFun.sci
+++ b/macros/ASTManagement/AST_HandleEndGenFun.sci
@@ -72,6 +72,9 @@ global STACKDEDUG
//NUT: verifica se ASTFunType e' veramente importante
// #RNU_RES_E
[ASTFunName,InArg,NInArg,OutArg,NOutArg] = AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType);
+ if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T)
+ SharedInfo.OpenCVUsed = %T;
+ end
if (ASTFunName == 'OpIns')
SharedInfo.SkipNextEqual = 1;
diff --git a/macros/CCodeGeneration/C_GenerateMakefile.bin b/macros/CCodeGeneration/C_GenerateMakefile.bin
index 5a095f4..efa5cd6 100644
--- a/macros/CCodeGeneration/C_GenerateMakefile.bin
+++ b/macros/CCodeGeneration/C_GenerateMakefile.bin
Binary files differ
diff --git a/macros/CCodeGeneration/C_GenerateMakefile.sci b/macros/CCodeGeneration/C_GenerateMakefile.sci
index 29e8a08..a915616 100644
--- a/macros/CCodeGeneration/C_GenerateMakefile.sci
+++ b/macros/CCodeGeneration/C_GenerateMakefile.sci
@@ -65,15 +65,14 @@ if getos() == 'Windows' then
else
if (target == 'RPi')
PrintStringInfo('CC = arm-linux-gnueabihf-gcc ',FileInfo.MakefileFilename,'file','y','y');
- else
+ PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('LDFLAGS = -llapack -lrefblas -lgfortran -lm -lwiringPi',FileInfo.MakefileFilename,'file','y','y');
+ else
PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y');
- end
- PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y');
- if (target == 'RPi')
- PrintStringInfo('LDFLAGS = -llapack -lrefblas -lgfortran -lm -lwiringPi',FileInfo.MakefileFilename,'file','y','y');
- else
- PrintStringInfo('LDFLAGS = -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y');
- end
+ PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('LDFLAGS = -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y');
+ end
+
end
//If ode function is used, add libgsl.
if(size(SharedInfo.Includelist) <> 0)
@@ -82,21 +81,26 @@ if(size(SharedInfo.Includelist) <> 0)
end
end
+if(SharedInfo.OpenCVUsed == %T)
+ PrintStringInfo('LDFLAGS += `pkg-config --libs opencv`',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('CFLAGS += `pkg-config --cflags opencv`',FileInfo.MakefileFilename,'file','y','y');
+end
+
// Binary definition
-PrintStringInfo('EXEFILENAME = mytest.exe',FileInfo.MakefileFilename,'file','y','y');
+PrintStringInfo('EXEFILENAME = '+SharedInfo.SCIMainFunName,FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)', FileInfo.MakefileFilename,'file','y','y');
// Sources
//Check the output format selected and insert files according to it
target = SharedInfo.Target;
PrintStringInfo('SRC = \\', FileInfo.MakefileFilename,'file','y','y');
-allSources = getAllSources(target);
+allSources = getAllSources(SharedInfo);
nbSources = size(allSources);
for i = 1:(nbSources(1) - 1)
[tmppath,tmpfile,tmpext] = fileparts(allSources(i));
- if(~isempty(strstr(allSources(i),'ode')))
+ if(~isempty(strstr(allSources(i),'dode')))
if(size(SharedInfo.Includelist) <> 0)
if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T))
PrintStringInfo(' $(CSRCDIR)/'+tmpfile+tmpext+' \\', FileInfo.MakefileFilename,'file','y','y');
diff --git a/macros/CCodeGeneration/C_Type.bin b/macros/CCodeGeneration/C_Type.bin
index f9bad33..78311b6 100644
--- a/macros/CCodeGeneration/C_Type.bin
+++ b/macros/CCodeGeneration/C_Type.bin
Binary files differ
diff --git a/macros/CCodeGeneration/C_Type.sci b/macros/CCodeGeneration/C_Type.sci
index 3c56b71..60a3f8b 100644
--- a/macros/CCodeGeneration/C_Type.sci
+++ b/macros/CCodeGeneration/C_Type.sci
@@ -50,6 +50,8 @@ elseif (ArgType == 'i32')
elseif (ArgType == 'fn') //This type introduced for ODE function,
// as it's one of the inout argument is name of the other function
OutC_Type = '';
+elseif (ArgType == 'im')
+ OutC_Type = 'IplImage*'
else
error(9999, 'Unknown Argument Type: ""'+ArgType+'"".');
end
diff --git a/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin b/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin
index 61f446f..fa48e83 100644
--- a/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin
+++ b/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci b/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci
index da5486d..3603c57 100644
--- a/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci
+++ b/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci
@@ -87,6 +87,8 @@ else
defaultprecision = 'u16';
elseif (tmpprecision == 'INT16')
defaultprecision = 'i16';
+ elseif (tmpprecision == 'CVIMAGE')
+ defaultprecision = 'IplImage'
end
end
diff --git a/macros/FunctionAnnotation/FA_GetFunAnn.bin b/macros/FunctionAnnotation/FA_GetFunAnn.bin
index c94c675..3c2f9d4 100644
--- a/macros/FunctionAnnotation/FA_GetFunAnn.bin
+++ b/macros/FunctionAnnotation/FA_GetFunAnn.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_GetFunAnn.sci b/macros/FunctionAnnotation/FA_GetFunAnn.sci
index ffdfa7f..912d099 100644
--- a/macros/FunctionAnnotation/FA_GetFunAnn.sci
+++ b/macros/FunctionAnnotation/FA_GetFunAnn.sci
@@ -131,7 +131,6 @@ if (FoundNOut*FoundNIn == 0)
PrintStringInfo(' ',ReportFileName,'both','y');
error(9999, 'SCI2CERROR: Incorrect function annotation.');
else
-
// In case we are reading to much informations
readNewLine = %t;
diff --git a/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin b/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin
new file mode 100644
index 0000000..1d824fb
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci b/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci
new file mode 100644
index 0000000..1c0d174
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci
@@ -0,0 +1,30 @@
+function typeout = FA_TP_CVIMAGE()
+// function typeout = FA_TP_INT16()
+// -----------------------------------------------------------------
+// Returns the OpenCV image type specifier (im)
+// for Function Annotations.
+//
+// Input data:
+// ---
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// Status:
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,0);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+typeout = 'im';
+
+endfunction
diff --git a/macros/FunctionAnnotation/FA_TP_INT16.bin b/macros/FunctionAnnotation/FA_TP_INT16.bin
index 2ebb734..e28e0c5 100644
--- a/macros/FunctionAnnotation/FA_TP_INT16.bin
+++ b/macros/FunctionAnnotation/FA_TP_INT16.bin
Binary files differ
diff --git a/macros/FunctionAnnotation/FA_TP_INT16.sci b/macros/FunctionAnnotation/FA_TP_INT16.sci
index 8971754..67b8178 100644
--- a/macros/FunctionAnnotation/FA_TP_INT16.sci
+++ b/macros/FunctionAnnotation/FA_TP_INT16.sci
@@ -1,7 +1,7 @@
function typeout = FA_TP_INT16()
// function typeout = FA_TP_INT16()
// -----------------------------------------------------------------
-// Returns the "uint8" type specifier
+// Returns the "int16" type specifier
// for Function Annotations.
//
// Input data:
diff --git a/macros/FunctionAnnotation/lib b/macros/FunctionAnnotation/lib
index b8b2d41..b7b5520 100644
--- a/macros/FunctionAnnotation/lib
+++ b/macros/FunctionAnnotation/lib
Binary files differ
diff --git a/macros/FunctionAnnotation/names b/macros/FunctionAnnotation/names
index 3db59cc..d9ae572 100644
--- a/macros/FunctionAnnotation/names
+++ b/macros/FunctionAnnotation/names
@@ -51,6 +51,7 @@ FA_SZ_SEL1
FA_SZ_SEL2
FA_TP_C
FA_TP_COMPLEX
+FA_TP_CVIMAGE
FA_TP_D
FA_TP_I
FA_TP_INT16
diff --git a/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin b/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
index 960068e..0c64927 100644
--- a/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
+++ b/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci b/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
index fe4edb1..a791f1e 100644
--- a/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
+++ b/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
@@ -26,6 +26,10 @@ RPiSupportFunctions = [
"RPI_SerialGetChar"
"RPI_ThreadCreate"
"RPI_PinISR"
+ "RPI_HardPWMWrite"
+ "RPI_HardPWMSetRange"
+ "RPI_HardPWMSetClock"
+ "RPI_HardPWMSetMode"
];
//Note: "RPI_SerialSendData" is removed since distinction between input data
diff --git a/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin b/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
index 1de4e22..1f20deb 100644
--- a/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
+++ b/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci b/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
index aede0b7..460a417 100644
--- a/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
+++ b/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
@@ -6,7 +6,8 @@ function RPI_DigitalSetup(pin, direction)
//
// Parameters
// pin : pin of RPi to be used
-// direction : direction to be set for pin (0 -> INPUT, 1 -> OUTPUT)
+// direction : direction to be set for pin
+// 0 -> INPUT, 1 -> OUTPUT, 2->PWM Output
//
// Description
// There are few pins available on RPi as Gpio or digital io. These pins can be used as digital output or input. Pin name must be provided from list provided. Please refer '' for complete list of pins. Direction can be 0 or 1 depending upon desired function (Input/output)
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.bin b/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.bin
new file mode 100644
index 0000000..1efe080
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci b/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci
new file mode 100644
index 0000000..3c05030
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci
@@ -0,0 +1,27 @@
+function RPI_HardPWMSetClock(clock_divisor)
+// Function to set PWM clock. PWM clock frequency is 19.2MHz, which can be reduced
+// using suitable clock_divisor (1 to 2048, powers of 2)
+//
+// Calling Sequence
+// RPI_HardPWMSetClock(clock_divisor)
+//
+// Parameters
+// clock_divisor: Value can be from 1 to 2048, powers of 2.
+// Description
+// This function decides pwm clock.
+// PWM frequency = (PWM Clock frequency/Clock divisor/range)
+// PWM clock frequency = 19.2 MHz
+// clock divisor is setup using RPI_HardPWMSetClock
+// range is setup using RPI_HardPWMSetRange
+// Examples
+//
+// See also
+// RPI_HardPWMSetWrite RPI_HardPWMSetRange
+//
+// Authors
+// Siddhesh Wani
+// -----------------------------------------------------------------
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+endfunction
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.bin b/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.bin
new file mode 100644
index 0000000..075d6e6
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci b/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci
new file mode 100644
index 0000000..2ab697b
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci
@@ -0,0 +1,24 @@
+function RPI_HardPWMSetMode(pwm_mode)
+// Function to set PWM mode. Two modes are available - balanced and mark/space
+//
+// Calling Sequence
+// RPI_HardPWMSetMode(pwm_mode)
+//
+// Parameters
+// pwm_mode: decides pwm mode
+// 0 -> balanced
+// 1 -> mark/space
+// Description
+// This function decides pwm mode
+// Examples
+//
+// See also
+// RPI_HardPWMSetWrite RPI_HardPWMSetRange
+//
+// Authors
+// Siddhesh Wani
+// -----------------------------------------------------------------
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+endfunction
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.bin b/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.bin
new file mode 100644
index 0000000..8ded270
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci b/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci
new file mode 100644
index 0000000..cb7dd67
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci
@@ -0,0 +1,27 @@
+function RPI_HardPWMSetRange(range_val)
+// Function to set range value for PWM. Range value along with clock divisor
+// decides pwm frequency. Range value must be less than 1024
+//
+// Calling Sequence
+// RPI_HardPWMSetRange(range_val)
+//
+// Parameters
+// range_val: range for pwm
+// Description
+// This function decides range for pwm.
+// PWM frequency = (PWM Clock frequency/Clock divisor/range)
+// PWM clock frequency = 19.2 MHz
+// clock divisor is setup using RPI_HardPWMSetClock
+// range is setup using RPI_HardPWMSetRange
+// Examples
+//
+// See also
+// RPI_HardPWMSetClock RPI_HardPWMWrite
+//
+// Authors
+// Siddhesh Wani
+// -----------------------------------------------------------------
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+endfunction
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMWrite.bin b/macros/Hardware/RasberryPi/RPI_HardPWMWrite.bin
new file mode 100644
index 0000000..9957f3a
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMWrite.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci b/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci
new file mode 100644
index 0000000..9f9f797
--- /dev/null
+++ b/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci
@@ -0,0 +1,31 @@
+function RPI_HardPWMWrite(pin,value)
+// Function to change pwm duty on specified pin. Hardware PWM is available
+// only on pin 12. So, only '12' should be provided as pin
+//
+// Calling Sequence
+// RPI_HardPWMWrite(12,512) //Value must be smaller than the range set
+// using RPI_HARDPWMSetRange
+//
+// Parameters
+// pin: pin no on which pwm value is to be changed. Currently only 12 is allowed
+// value: pwm value for given pin. This must be less than range value set
+// Description
+// This function changes pwm duty on specified pin. As for RPi, only one pin
+// (pin 12) is available for hardware PWM.
+// PWM frequency = (PWM Clock frequency/Clock divisor/range)
+// PWM clock frequency = 19.2 MHz
+// clock divisor is setup using RPI_HardPWMSetClock
+// range is setup using RPI_HardPWMSetRange
+// Actual PWM duty = value/range
+// Examples
+//
+// See also
+// RPI_HardPWMSetClock RPI_HardPWMSetRange
+//
+// Authors
+// Siddhesh Wani
+// -----------------------------------------------------------------
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+endfunction
diff --git a/macros/Hardware/RasberryPi/RPI_SerialGetChar.bin b/macros/Hardware/RasberryPi/RPI_SerialGetChar.bin
index 9e6dd09..928f28a 100644
--- a/macros/Hardware/RasberryPi/RPI_SerialGetChar.bin
+++ b/macros/Hardware/RasberryPi/RPI_SerialGetChar.bin
Binary files differ
diff --git a/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci b/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci
index ce17ea8..0271449 100644
--- a/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci
+++ b/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci
@@ -2,7 +2,7 @@ function data = RPI_SerialGetChar(fd)
// Function to read data from specified serial port
//
// Calling Sequence
-// RPI_SerialGetCharfd)
+// RPI_SerialGetChar(fd)
//
// Parameters
// fd: file descriptor returned when serial port was opened
diff --git a/macros/Hardware/RasberryPi/lib b/macros/Hardware/RasberryPi/lib
index 40a6b04..d25d944 100644
--- a/macros/Hardware/RasberryPi/lib
+++ b/macros/Hardware/RasberryPi/lib
Binary files differ
diff --git a/macros/Hardware/RasberryPi/names b/macros/Hardware/RasberryPi/names
index a97a189..fa64776 100644
--- a/macros/Hardware/RasberryPi/names
+++ b/macros/Hardware/RasberryPi/names
@@ -7,6 +7,10 @@ RPI_DigitalOut
RPI_DigitalSetup
RPI_GetMicros
RPI_GetMillis
+RPI_HardPWMSetClock
+RPI_HardPWMSetMode
+RPI_HardPWMSetRange
+RPI_HardPWMWrite
RPI_PinISR
RPI_SerialClose
RPI_SerialFlush
diff --git a/macros/ImageProcessing/CV_CreateImage.bin b/macros/ImageProcessing/CV_CreateImage.bin
new file mode 100644
index 0000000..4c638cc
--- /dev/null
+++ b/macros/ImageProcessing/CV_CreateImage.bin
Binary files differ
diff --git a/macros/ImageProcessing/CV_CreateImage.sci b/macros/ImageProcessing/CV_CreateImage.sci
new file mode 100644
index 0000000..85c01a4
--- /dev/null
+++ b/macros/ImageProcessing/CV_CreateImage.sci
@@ -0,0 +1,41 @@
+// Copyright (C) 2016 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Siddhesh Wani
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function img = CV_CreateImage(width,height,bit_depth,no_of_channels)
+// function to create an image object of given size and type
+//
+// Calling Sequence
+// CV_CreateImage(image_size,bit_depth,no_of_channels)
+//
+// Parameters
+// image_size: width and height of image
+// bit_depth: Bit depth of image elements
+// no_of_channels: no of channels per pixels
+//
+// Description
+// This function can be used to create opencv image object. For more info
+// about bit depth and channels,please refer to OpenCV documentation
+// Examples
+// CV_CreateImage([320 240], "8U", 1) //to create image of the size 320*240
+// pixels with 8 bit unsigned each pixels and gray scale image
+//
+// See also
+// CV_LoadImage
+//
+//
+// Authors
+// Siddhesh Wani
+//
+img = 0;
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for OpenCV
+
+endfunction
diff --git a/macros/ImageProcessing/buildmacros.sce b/macros/ImageProcessing/buildmacros.sce
new file mode 100644
index 0000000..14c7c1b
--- /dev/null
+++ b/macros/ImageProcessing/buildmacros.sce
@@ -0,0 +1,30 @@
+// Copyright (C) 2016 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Siddhesh Wani
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+OpencvDirs = [ "core", ...
+ "highgui"];
+
+
+ current_path = get_absolute_file_path("buildmacros.sce");
+
+ for L=1:size(OpencvDirs,"*")
+ myfile = current_path + filesep() + OpencvDirs(L) + filesep() + "buildmacros.sce";
+ if isfile(myfile) then
+ exec(myfile);
+ end
+end
+
+clear current_path;
+
+tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
+
+clear tbx_build_macros;
+
diff --git a/macros/ImageProcessing/core/CV_CreateImage.bin b/macros/ImageProcessing/core/CV_CreateImage.bin
new file mode 100644
index 0000000..4c638cc
--- /dev/null
+++ b/macros/ImageProcessing/core/CV_CreateImage.bin
Binary files differ
diff --git a/macros/ImageProcessing/core/CV_CreateImage.sci b/macros/ImageProcessing/core/CV_CreateImage.sci
new file mode 100644
index 0000000..4964920
--- /dev/null
+++ b/macros/ImageProcessing/core/CV_CreateImage.sci
@@ -0,0 +1,30 @@
+function img = CV_CreateImage(width,height,bit_depth,no_of_channels)
+// function to create an image object of given size and type
+//
+// Calling Sequence
+// CV_CreateImage(image_size,bit_depth,no_of_channels)
+//
+// Parameters
+// image_size: width and height of image
+// bit_depth: Bit depth of image elements
+// no_of_channels: no of channels per pixels
+//
+// Description
+// This function can be used to create opencv image object. For more info
+// about bit depth and channels,please refer to OpenCV documentation
+// Examples
+// CV_CreateImage([320 240], "8U", 1) //to create image of the size 320*240
+// pixels with 8 bit unsigned each pixels and gray scale image
+//
+// See also
+// CV_LoadImage
+//
+//
+// Authors
+// Siddhesh Wani
+//
+img = 0;
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for OpenCV
+
+endfunction
diff --git a/macros/ImageProcessing/core/buildmacros.sce b/macros/ImageProcessing/core/buildmacros.sce
new file mode 100644
index 0000000..60fd284
--- /dev/null
+++ b/macros/ImageProcessing/core/buildmacros.sce
@@ -0,0 +1,15 @@
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+//
+//
+
+tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
+
+clear tbx_build_macros;
diff --git a/macros/ImageProcessing/core/lib b/macros/ImageProcessing/core/lib
new file mode 100644
index 0000000..4bccbc8
--- /dev/null
+++ b/macros/ImageProcessing/core/lib
Binary files differ
diff --git a/macros/ImageProcessing/core/names b/macros/ImageProcessing/core/names
new file mode 100644
index 0000000..a681f79
--- /dev/null
+++ b/macros/ImageProcessing/core/names
@@ -0,0 +1 @@
+CV_CreateImage
diff --git a/macros/ImageProcessing/highgui/CV_LoadImage.bin b/macros/ImageProcessing/highgui/CV_LoadImage.bin
new file mode 100644
index 0000000..f8e1337
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_LoadImage.bin
Binary files differ
diff --git a/macros/ImageProcessing/highgui/CV_LoadImage.sci b/macros/ImageProcessing/highgui/CV_LoadImage.sci
new file mode 100644
index 0000000..93fc49b
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_LoadImage.sci
@@ -0,0 +1,41 @@
+// Copyright (C) 2016 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Siddhesh Wani
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function img = CV_LoadImage(filename,loadtype)
+// function to load an image object from given filename
+//
+// Calling Sequence
+// CV_LoadImage(filename,loadtype)
+//
+// Parameters
+// filename: name of file to be opened
+// loadtype: desired load method
+// <0 --> image is loaded as is (with alpha channel)
+// =0 --> image is loaded as greyscale
+// >0 --> 3 channel color image is loaded
+//
+// Description
+// This function can be used for loading a previously stored image
+// Examples
+// CV_LoadImage('~/test.jpg',0)
+//
+// See also
+// CV_CreateImage
+//
+//
+// Authors
+// Siddhesh Wani
+//
+img = 0;
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for OpenCV
+
+endfunction
diff --git a/macros/ImageProcessing/highgui/CV_SaveImage.bin b/macros/ImageProcessing/highgui/CV_SaveImage.bin
new file mode 100644
index 0000000..8d056bf
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_SaveImage.bin
Binary files differ
diff --git a/macros/ImageProcessing/highgui/CV_SaveImage.sci b/macros/ImageProcessing/highgui/CV_SaveImage.sci
new file mode 100644
index 0000000..8d5ca16
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_SaveImage.sci
@@ -0,0 +1,39 @@
+// Copyright (C) 2016 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Siddhesh Wani
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function status = CV_SaveImage(filename,img)
+// function to save an image object as a given filename
+//
+// Calling Sequence
+// CV_SaveImage(filename,img)
+//
+// Parameters
+// filename: name of file image to be saved as
+// img: image to be saved
+//
+// Description
+// This function can be used for saving image. File format is detected
+// from file extension
+// Examples
+// img = CV_LoadImage('~/test.jpg',0)
+// CV_SaveImage('test1.png',img)
+//
+// See also
+// CV_LoadImage CV_CreateImage
+//
+// Authors
+// Siddhesh Wani
+//
+status = 0;
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for OpenCV
+
+endfunction
diff --git a/macros/ImageProcessing/highgui/CV_ShowImage.bin b/macros/ImageProcessing/highgui/CV_ShowImage.bin
new file mode 100644
index 0000000..c4e00fc
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_ShowImage.bin
Binary files differ
diff --git a/macros/ImageProcessing/highgui/CV_ShowImage.sci b/macros/ImageProcessing/highgui/CV_ShowImage.sci
new file mode 100644
index 0000000..0864c3f
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_ShowImage.sci
@@ -0,0 +1,40 @@
+// Copyright (C) 2016 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Siddhesh Wani
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function CV_ShowImage(winname,img)
+// function to show an image
+//
+// Calling Sequence
+// CV_ShowImage(img)
+// CV_ShowImage(winname,img)
+//
+// Parameters
+// winname: name of window in which img is to be shown
+// img: image to be shown already acquired (from file/camera)
+//
+// Description
+// This function can be used for showing images
+// Examples
+// img = CV_LoadImage('~/test.jpg',0)
+// CV_ShowImage(img)
+//
+// See also
+// CV_CreateImage CV_LoadImage
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for OpenCV
+
+endfunction
diff --git a/macros/ImageProcessing/highgui/CV_WaitKey.bin b/macros/ImageProcessing/highgui/CV_WaitKey.bin
new file mode 100644
index 0000000..30a42f4
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_WaitKey.bin
Binary files differ
diff --git a/macros/ImageProcessing/highgui/CV_WaitKey.sci b/macros/ImageProcessing/highgui/CV_WaitKey.sci
new file mode 100644
index 0000000..514bc53
--- /dev/null
+++ b/macros/ImageProcessing/highgui/CV_WaitKey.sci
@@ -0,0 +1,40 @@
+// Copyright (C) 2016 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Siddhesh Wani
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function CV_WaitKey(delay)
+// function similar to cvWaitKey
+//
+// Calling Sequence
+// CV_WaitKey(delay)
+//
+// Parameters
+// delay: waiting delay, if 0 then wait till keypress
+//
+// Description
+// This function can be used for inseting some delay. This function must
+// follow CV_ShowImage to display image.
+// Examples
+// img = CV_LoadImage('~/test.jpg',0)
+// CV_ShowImage('',img)
+// CV_WaitKey(0);
+//
+// See also
+// CV_LoadImage CV_ShowImage
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for OpenCV
+
+endfunction
diff --git a/macros/ImageProcessing/highgui/buildmacros.sce b/macros/ImageProcessing/highgui/buildmacros.sce
new file mode 100644
index 0000000..60fd284
--- /dev/null
+++ b/macros/ImageProcessing/highgui/buildmacros.sce
@@ -0,0 +1,15 @@
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+//
+//
+
+tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
+
+clear tbx_build_macros;
diff --git a/macros/ImageProcessing/highgui/lib b/macros/ImageProcessing/highgui/lib
new file mode 100644
index 0000000..2db0482
--- /dev/null
+++ b/macros/ImageProcessing/highgui/lib
Binary files differ
diff --git a/macros/ImageProcessing/highgui/names b/macros/ImageProcessing/highgui/names
new file mode 100644
index 0000000..a717164
--- /dev/null
+++ b/macros/ImageProcessing/highgui/names
@@ -0,0 +1,4 @@
+CV_LoadImage
+CV_SaveImage
+CV_ShowImage
+CV_WaitKey
diff --git a/macros/ImageProcessing/lib b/macros/ImageProcessing/lib
new file mode 100644
index 0000000..d374b90
--- /dev/null
+++ b/macros/ImageProcessing/lib
Binary files differ
diff --git a/macros/ImageProcessing/names b/macros/ImageProcessing/names
new file mode 100644
index 0000000..a681f79
--- /dev/null
+++ b/macros/ImageProcessing/names
@@ -0,0 +1 @@
+CV_CreateImage
diff --git a/macros/SymbolTable/ST_AnalyzeScope.bin b/macros/SymbolTable/ST_AnalyzeScope.bin
index 950f704..7e727a0 100644
--- a/macros/SymbolTable/ST_AnalyzeScope.bin
+++ b/macros/SymbolTable/ST_AnalyzeScope.bin
Binary files differ
diff --git a/macros/SymbolTable/ST_AnalyzeScope.sci b/macros/SymbolTable/ST_AnalyzeScope.sci
index c89c359..6ce9482 100644
--- a/macros/SymbolTable/ST_AnalyzeScope.sci
+++ b/macros/SymbolTable/ST_AnalyzeScope.sci
@@ -47,6 +47,7 @@ TempVarsFileName = FileInfo.Funct(nxtscifunnumber).TempVarFileName;
// ------------------------------------------------------------------
// #RNU_RES_E
for cntout = 1:NOutArg
+
// #RNU_RES_B
PrintStringInfo(' Symbol ""'+OutArg(cntout).Name+'""',ReportFileName,'file','y');
// #RNU_RES_E
diff --git a/macros/SymbolTable/ST_InsOutArg.bin b/macros/SymbolTable/ST_InsOutArg.bin
index 94bcd3a..108d297 100644
--- a/macros/SymbolTable/ST_InsOutArg.bin
+++ b/macros/SymbolTable/ST_InsOutArg.bin
Binary files differ
diff --git a/macros/SymbolTable/ST_InsOutArg.sci b/macros/SymbolTable/ST_InsOutArg.sci
index 7d99ddf..85c983d 100644
--- a/macros/SymbolTable/ST_InsOutArg.sci
+++ b/macros/SymbolTable/ST_InsOutArg.sci
@@ -94,7 +94,8 @@ for counteroutput = 1:NOutArg
if (TBFlagfound == 1)
if (TBFlagEqualSymbols == 0)
PrintStringInfo(' ',ReportFileName,'both','y');
- PrintStringInfo('SCI2CERROR: Symbol Table Conflict. Trying to insert again symbol ""'+...
+ PrintStringIn
+ fo('SCI2CERROR: Symbol Table Conflict. Trying to insert again symbol ""'+...
OutArg(counteroutput).Name+'"" with different settings',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Please check that you are not using variable ""'+OutArg(counteroutput).Name+'""',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: with different sizes and/or types.',ReportFileName,'both','y');
@@ -125,6 +126,13 @@ for counteroutput = 1:NOutArg
OutArg(counteroutput).Dimension,...
SymbTableFileName);
end
+
+ // IndentLevelDeclaration = 1; //NUT: per ora lo forzo sempre a 1
+ // IndentLevelMalloc = SharedInfo.NIndent;
+ // FlagExt = 0;
+ // C_GenDeclarations(OutArg(counteroutput),CDeclarationFileName,IndentLevelDeclaration,ReportFileName,FlagExt,SharedInfo.ResizeApproach);
+
+
end
elseif (TBFlagfound == 2)
// #RNU_RES_B
diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
index f9c8482..ab16036 100644
--- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
+++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
Binary files differ
diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index 72652e0..5e4eb03 100644
--- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -4769,30 +4769,40 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+FunctionName = 'RPI_DigitalOut';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMWrite';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
//------------------------------------
//---- Class RPI_DigitalOut ----------
//------------------------------------
-ClassName = 'RPI_DigitalOut';
+//ClassName = 'RPI_DigitalOut';
// --- 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');
+//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);
+//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
-PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
-FunctionName = 'RPI_DigitalOut';
-PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
-INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
-INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//FunctionName = 'RPI_DigitalOut';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
//------------------------------------
//---- Class RPI_DigitalIn -----------
@@ -4822,21 +4832,21 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
//------------------------------------
//---- Class RPI_DelayMilli ----------
//------------------------------------
-ClassName = 'RPI_DelayMilli';
+//ClassName = 'RPI_DelayMilli';
// --- 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');
+//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);
+//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
-PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
FunctionName = 'RPI_DelayMilli';
@@ -4849,6 +4859,31 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+FunctionName = 'RPI_SerialClose';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_SerialFlush';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetRange';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetClock';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetMode';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
//------------------------------------
//---- Class RPI_GetMilli ----------
//------------------------------------
@@ -4907,31 +4942,31 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
//------------------------------------
//---- Class RPI_SetupClose ----------
//------------------------------------
-ClassName = 'RPI_SetupClose';
+//ClassName = 'RPI_SetupClose';
// --- 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');
+//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);
+//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
-PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
-FunctionName = 'RPI_SerialClose';
-PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
-INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
-INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'RPI_SerialFlush';
-PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
-INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
-INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//FunctionName = 'RPI_SerialClose';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//FunctionName = 'RPI_SerialFlush';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
//------------------------------------
//---- Class RPI_SerialSendData ----------
@@ -5500,6 +5535,118 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---- Class cvCreateImage --------------------
+//------------------------------------
+ClassName = 'CV_CreateImage';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''im''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0g2d0'+ArgSeparator+'im0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_CreateImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cvLoadImage --------------------
+//------------------------------------
+ClassName = 'CV_LoadImage';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''im''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2d0'+ArgSeparator+'im0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_LoadImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cvShowImage -------------
+//------------------------------------
+ClassName = 'CV_ShowImage';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+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');
+
+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');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2im0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('im0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_ShowImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'CV_SaveImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_WaitKey --------------
+//------------------------------------
+ClassName = 'CV_WaitKey';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+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');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_WaitKey';
+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/macros/ToolInitialization/INIT_GenSharedInfo.bin b/macros/ToolInitialization/INIT_GenSharedInfo.bin
index f0955c3..7263830 100644
--- a/macros/ToolInitialization/INIT_GenSharedInfo.bin
+++ b/macros/ToolInitialization/INIT_GenSharedInfo.bin
Binary files differ
diff --git a/macros/ToolInitialization/INIT_GenSharedInfo.sci b/macros/ToolInitialization/INIT_GenSharedInfo.sci
index 2aeec08..abe813c 100644
--- a/macros/ToolInitialization/INIT_GenSharedInfo.sci
+++ b/macros/ToolInitialization/INIT_GenSharedInfo.sci
@@ -62,7 +62,7 @@ SharedInfo.NFilesToTranslate = 1;
// --- Annotations. ---
SharedInfo.Annotations.GBLVAR = 'global';
-SharedInfo.Annotations.DataPrec = {'uint8','int8','uint16','int16','int','float','double'};
+SharedInfo.Annotations.DataPrec = {'uint8','int8','uint16','int16','int','float','double','IplImage'};
SharedInfo.Annotations.FUNNIN = 'NIN=';
SharedInfo.Annotations.FUNNOUT = 'NOUT=';
SharedInfo.Annotations.FUNTYPE = '''OUT(''+string(SCI2C_nout)+'').TP='''; // Type includes also precision.
@@ -130,5 +130,6 @@ SharedInfo.Target = Target; // Specifies code generation target.
SharedInfo.Includelist = list(); //Maintains list of functions being used in code
// to add their header files to main function.
+SharedInfo.OpenCVUsed = %F; // Specifies if opencv library is used or not
endfunction
diff --git a/macros/buildmacros.sce b/macros/buildmacros.sce
index 91f5a06..f02096d 100644
--- a/macros/buildmacros.sce
+++ b/macros/buildmacros.sce
@@ -8,10 +8,11 @@ Directories = [ "ASTManagement", ...
"FunctionList", ...
"GeneralFunctions", ...
"SymbolTable", ...
- "ToolInitialization"...
- "Hardware/AVR"...
- "Hardware/RasberryPi"...
- "Scilab-Arduino" ];
+ "ToolInitialization", ...
+ "Hardware/AVR", ...
+ "Hardware/RasberryPi", ...
+ "ImageProcessing", ...
+ "Scilab-Arduino"];
current_path_buildmacros = get_absolute_file_path("buildmacros.sce");
diff --git a/macros/findDeps/getAllHeaders.bin b/macros/findDeps/getAllHeaders.bin
index b7773ac..2dad8e8 100644
--- a/macros/findDeps/getAllHeaders.bin
+++ b/macros/findDeps/getAllHeaders.bin
Binary files differ
diff --git a/macros/findDeps/getAllHeaders.sci b/macros/findDeps/getAllHeaders.sci
index 71b8b20..846f8f6 100644
--- a/macros/findDeps/getAllHeaders.sci
+++ b/macros/findDeps/getAllHeaders.sci
@@ -10,7 +10,8 @@
//
//
-function allHeaders = getAllHeaders(Target)
+function allHeaders = getAllHeaders(SharedInfo)
+ Target = SharedInfo.Target;
//Header files common to all types of output format.
Standalone_headers = [
@@ -176,8 +177,13 @@ function allHeaders = getAllHeaders(Target)
"src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h"
"src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h"
"src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h"
+ "src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h"
];
+ OpenCV_headers = [
+ "src/c/imageProcessing/includes/cvcore.h"
+ "src/c/imageProcessing/includes/cvhighgui.h"];
+
if Target == "StandAlone"
allHeaders = Standalone_headers;
elseif Target == "Arduino"
@@ -188,4 +194,8 @@ function allHeaders = getAllHeaders(Target)
allHeaders = cat(1,Standalone_headers, RPi_headers);
end
+ if (SharedInfo.OpenCVUsed == %T)
+ allHeaders = cat(1,allHeaders,OpenCV_headers);
+ end
+
endfunction
diff --git a/macros/findDeps/getAllInterfaces.bin b/macros/findDeps/getAllInterfaces.bin
index 3558d2c..ee40b12 100644
--- a/macros/findDeps/getAllInterfaces.bin
+++ b/macros/findDeps/getAllInterfaces.bin
Binary files differ
diff --git a/macros/findDeps/getAllInterfaces.sci b/macros/findDeps/getAllInterfaces.sci
index 9d86180..9097547 100644
--- a/macros/findDeps/getAllInterfaces.sci
+++ b/macros/findDeps/getAllInterfaces.sci
@@ -10,7 +10,8 @@
//
//
-function allInterfaces = getAllInterfaces(Target)
+function allInterfaces = getAllInterfaces(SharedInfo)
+ Target = SharedInfo.Target;
//Interface files common to all types of output format
Standalone_interfaces = [
"src/c/auxiliaryFunctions/interfaces/int_rand.h"
@@ -167,8 +168,13 @@ function allInterfaces = getAllInterfaces(Target)
"src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h"
"src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h"
"src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h"
+ "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h"
];
+ OpenCV_interfaces = [
+ "src/c/imageProcessing/interfaces/int_cvcore.h"
+ "src/c/imageProcessing/interfaces/int_cvhighgui.h"];
+
if Target == "StandAlone"
allInterfaces = Standalone_interfaces;
elseif Target == "Arduino"
@@ -179,4 +185,8 @@ function allInterfaces = getAllInterfaces(Target)
allInterfaces = cat(1,Standalone_interfaces, RPI_interfaces);
end
+ if (SharedInfo.OpenCVUsed == %T)
+ allInterfaces = cat(1,allInterfaces,OpenCV_interfaces)
+ end
+
endfunction
diff --git a/macros/findDeps/getAllLibraries.bin b/macros/findDeps/getAllLibraries.bin
index 7828cd2..c6d006f 100644
--- a/macros/findDeps/getAllLibraries.bin
+++ b/macros/findDeps/getAllLibraries.bin
Binary files differ
diff --git a/macros/findDeps/getAllLibraries.sci b/macros/findDeps/getAllLibraries.sci
index 7741caf..7cd8f91 100644
--- a/macros/findDeps/getAllLibraries.sci
+++ b/macros/findDeps/getAllLibraries.sci
@@ -1,6 +1,5 @@
-
-function allLibraries = getAllLibraries(Target)
-
+function allLibraries = getAllLibraries(SharedInfo)
+ Target = SharedInfo.Target;
//Library files required for "RasberryPi" target
RPi_libs = [
"src/c/hardware/rasberrypi/libraries/wiringPi/libwiringPi.so"
diff --git a/macros/findDeps/getAllSources.bin b/macros/findDeps/getAllSources.bin
index 5f60ac9..974e946 100644
--- a/macros/findDeps/getAllSources.bin
+++ b/macros/findDeps/getAllSources.bin
Binary files differ
diff --git a/macros/findDeps/getAllSources.sci b/macros/findDeps/getAllSources.sci
index 84975fc..dafa503 100644
--- a/macros/findDeps/getAllSources.sci
+++ b/macros/findDeps/getAllSources.sci
@@ -10,7 +10,9 @@
//
//
-function allSources = getAllSources(Target)
+function allSources = getAllSources(SharedInfo)
+ Target = SharedInfo.Target;
+
//Files common to types of output format
Standalone_files = [ "src/c/auxiliaryFunctions/abs/sabsa.c"
"src/c/auxiliaryFunctions/abs/sabss.c"
@@ -1029,9 +1031,18 @@ function allSources = getAllSources(Target)
"src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c"
"src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c"
"src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c"
+ "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c"
+ "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c"
+ "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c"
+ "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c"
"src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c"
];
+ OpenCV_files = [
+ "src/c/imageProcessing/cvcore/imcvCreateImages.c"
+ "src/c/imageProcessing/cvhighgui/imcvLoadImages.c"
+ "src/c/imageProcessing/cvhighgui/imcvShowImages.c"];
+
if Target == "StandAlone"
allSources = Standalone_files;
elseif Target == "Arduino"
@@ -1042,4 +1053,9 @@ function allSources = getAllSources(Target)
allSources = cat(1,Standalone_files, RPI_files);
end
+ if (SharedInfo.OpenCVUsed == %T)
+ allSources = cat(1,allSources,OpenCV_files);
+ end
+
+
endfunction
diff --git a/macros/runsci2c.bin b/macros/runsci2c.bin
index e3770d0..6292824 100644
--- a/macros/runsci2c.bin
+++ b/macros/runsci2c.bin
Binary files differ
diff --git a/macros/runsci2c.sci b/macros/runsci2c.sci
index 5efca90..b0bb16b 100644
--- a/macros/runsci2c.sci
+++ b/macros/runsci2c.sci
@@ -92,11 +92,11 @@ load(SharedInfoDatFile,'SharedInfo');
global SCI2CHOME
-allSources = SCI2CHOME + "/" + getAllSources(Target);
-allHeaders = SCI2CHOME + "/" +getAllHeaders(Target);
-allInterfaces = SCI2CHOME + "/" + getAllInterfaces(Target);
-if(~isempty(getAllLibraries(Target)))
- allLibraries = SCI2CHOME + "/" + getAllLibraries(Target);
+allSources = SCI2CHOME + "/" + getAllSources(SharedInfo);
+allHeaders = SCI2CHOME + "/" +getAllHeaders(SharedInfo);
+allInterfaces = SCI2CHOME + "/" + getAllInterfaces(SharedInfo);
+if(~isempty(getAllLibraries(SharedInfo)))
+ allLibraries = SCI2CHOME + "/" + getAllLibraries(SharedInfo);
else
allLibraries = ''
end
@@ -115,7 +115,7 @@ for i = 1:size(allSources, "*")
// DEBUG only
//disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
//Copy ode related functions only if 'ode' function is used.
- if(~isempty(strstr(allSources(i),'ode')))
+ if(~isempty(strstr(allSources(i),'dode')))
if(size(SharedInfo.Includelist) <> 0)
if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T))
copyfile(allSources(i), SCI2COutputPath+"/src/c/");