summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2.3-1/builder.sce34
-rw-r--r--2.3-1/etc/scilab2c.start1
-rw-r--r--2.3-1/includes/sci2clib.h11
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleEndGenFun.binbin77644 -> 78824 bytes
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci18
-rw-r--r--2.3-1/macros/ASTManagement/libbin1468 -> 1644 bytes
-rw-r--r--2.3-1/macros/ASTManagement/names68
-rw-r--r--2.3-1/macros/CCodeGeneration/C_FinalizeCode.binbin13696 -> 13696 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_Funcall.sci4
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateMakefile.binbin17792 -> 17792 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.binbin13696 -> 13696 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.sci8
-rw-r--r--2.3-1/macros/CCodeGeneration/C_Type.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.binbin10540 -> 11192 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/libbin1656 -> 1928 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/names88
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRADCSetup.sci32
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRDigitalOut.binbin0 -> 3760 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci32
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRDigitalSetup.binbin0 -> 3932 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci32
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRReadADC.sci31
-rw-r--r--2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.binbin0 -> 1256 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci16
-rw-r--r--2.3-1/macros/Hardware/AVR/GetPeripheral.binbin0 -> 2364 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/GetPeripheral.sci21
-rw-r--r--2.3-1/macros/Hardware/AVR/InsertPeripheralInList.binbin0 -> 1928 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci17
-rw-r--r--2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.binbin0 -> 2712 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci22
-rw-r--r--2.3-1/macros/Hardware/AVR/buildmacros.sce15
-rw-r--r--2.3-1/macros/Hardware/AVR/libbin0 -> 728 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/names6
-rw-r--r--2.3-1/macros/Hardware/buildmacros.sce19
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_CreateDirs.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.binbin407504 -> 895476 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci56
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenFileInfo.binbin13696 -> 13696 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci6
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenLibraries.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.binbin13696 -> 13696 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_LoadLibraries.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_RemoveDirs.binbin13696 -> 13696 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.binbin21152 -> 21248 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.sci6
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/ManageNextConversion.binbin13696 -> 13696 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.binbin30256 -> 30256 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/libbin632 -> 944 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/names13
-rw-r--r--2.3-1/macros/buildmacros.sce3
-rw-r--r--2.3-1/macros/cb_sci2c_gui.binbin13696 -> 17088 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.binbin20944 -> 21056 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.sci7
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.binbin19912 -> 20960 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.sci8
-rw-r--r--2.3-1/macros/findDeps/getAllSources.binbin89280 -> 89488 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllSources.sci14
-rw-r--r--2.3-1/macros/findDeps/getArduinoFiles.binbin9600 -> 9600 bytes
-rw-r--r--2.3-1/macros/libbin500 -> 676 bytes
-rw-r--r--2.3-1/macros/names2
-rw-r--r--2.3-1/macros/runsci2c.binbin17168 -> 26052 bytes
-rw-r--r--2.3-1/macros/runsci2c.sci6
-rw-r--r--2.3-1/macros/sci2c_gui.binbin49952 -> 55932 bytes
-rw-r--r--2.3-1/macros/scilab2c.binbin16944 -> 18696 bytes
-rw-r--r--2.3-1/macros/scilab2c.sci8
-rw-r--r--2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c42
-rw-r--r--2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c46
-rw-r--r--2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c54
-rw-r--r--2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c69
-rw-r--r--2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalSetups.c71
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h27
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h45
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h26
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h30
-rw-r--r--2.3-1/src/c/operations/addition/i8adda.c20
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h2
-rw-r--r--2.3-1/unloader.sce14
79 files changed, 953 insertions, 97 deletions
diff --git a/2.3-1/builder.sce b/2.3-1/builder.sce
new file mode 100644
index 00000000..71523a6b
--- /dev/null
+++ b/2.3-1/builder.sce
@@ -0,0 +1,34 @@
+//
+// 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
+//
+//
+//mode(-1);
+lines(0);
+try
+ getversion('scilab');
+catch
+ error(gettext('Scilab 5.0 or more is required.'));
+end;
+// ====================================================================
+if ~with_module('development_tools') then
+ error(msprintf(gettext('%s module not installed."),'development_tools'));
+end
+// ====================================================================
+TOOLBOX_NAME = 'scilab2c';
+TOOLBOX_TITLE = 'Scilab 2 C Converter';
+// ====================================================================
+toolbox_dir = get_absolute_file_path('builder.sce');
+
+tbx_builder_macros(toolbox_dir);
+//tbx_builder_help(toolbox_dir);
+tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
+
+clear toolbox_dir TOOLBOX_NAME TOOLBOX_TITLE;
+// ====================================================================
diff --git a/2.3-1/etc/scilab2c.start b/2.3-1/etc/scilab2c.start
index 14feb3c2..47554ab5 100644
--- a/2.3-1/etc/scilab2c.start
+++ b/2.3-1/etc/scilab2c.start
@@ -20,6 +20,7 @@ sci2c_GenFunctionslib = lib(pathmacros + "GeneralFunctions" + filesep());
sci2c_SymbolTablelib = lib(pathmacros + "SymbolTable" + filesep());
sci2c_ToolInitlib = lib(pathmacros + "ToolInitialization" + filesep());
sci2c_finDeps = lib(pathmacros + "findDeps" + filesep());
+sci2c_AVRlib = lib(pathmacros + "Hardware\AVR" + filesep());
clear pathmacros;
// Load and add help chapter
diff --git a/2.3-1/includes/sci2clib.h b/2.3-1/includes/sci2clib.h
index aa6a9cc6..b9820bcd 100644
--- a/2.3-1/includes/sci2clib.h
+++ b/2.3-1/includes/sci2clib.h
@@ -330,6 +330,7 @@
#include "types.h"
/*Scilab-arduino toolbox*/
+#ifdef ARDUINO
#include "int_cmd_digital_out.h"
#include "cmd_digital_out.h"
#include "int_cmd_digital_in.h"
@@ -340,5 +341,15 @@
#include "cmd_analog_in.h"
#include "int_sleep.h"
#include "sleep.h"
+#endif
+
+/*AVR*/
+#ifdef AVR
+#include "int_AVRPeripheralGPIO.h"
+#include "AVRPeripheralGPIO.h"
+#include "int_AVRPeripheralADC.h"
+#include "AVRPeripheralADC.h"
+
+#endif
#endif /* !__SCI2CLIB_H__ */
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin
index 12f738d4..8b3ce654 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin
+++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin
Binary files differ
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
index 69fbb82e..f9515cd1 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
+++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
@@ -40,12 +40,13 @@ SCI2CNInArgCheck(argn(2),3,3);
// -----------------------
// --- Initialization. ---
// -----------------------
-nxtscifunname = SharedInfo.NextSCIFunName;
-nxtscifunnumber = SharedInfo.NextSCIFunNumber;
-ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
-Pass1HeaderFileName = FileInfo.Funct(nxtscifunnumber).Pass1HeaderFileName;
-FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir;
-CGblDeclarFileName = FileInfo.Funct(nxtscifunnumber).CGblDeclarFileName;
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+Pass1HeaderFileName = FileInfo.Funct(nxtscifunnumber).Pass1HeaderFileName;
+FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir;
+CGblDeclarFileName = FileInfo.Funct(nxtscifunnumber).CGblDeclarFileName;
+PeripheralInitListFile = FileInfo.PeripheralInitListFile;
Flag_FunAlreadyCalled = 0;
// #RNU_RES_B
@@ -101,6 +102,11 @@ elseif (ASTFunName == 'global')
PrintStringInfo(' ',ReportFileName,'both','y');
error(9999, 'SCI2CERROR: Unexpected number of output arguments for global function.');
end
+//elseif(IsAVRSupportFunction(ASTFunName))
+ //Get the peripheral from function name and input arguements, insert it in
+ //list of used peripherals.
+ // PeripheralUsed=GetPeripheral(ASTFunName,InArg);
+ // InsertPeripheralInList(PeripheralUsed,PeripheralInitListFile);
end
// #RNU_RES_B
diff --git a/2.3-1/macros/ASTManagement/lib b/2.3-1/macros/ASTManagement/lib
index ccecc91e..4cd697ce 100644
--- a/2.3-1/macros/ASTManagement/lib
+++ b/2.3-1/macros/ASTManagement/lib
Binary files differ
diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names
index 3e6bfa8c..7f6d053d 100644
--- a/2.3-1/macros/ASTManagement/names
+++ b/2.3-1/macros/ASTManagement/names
@@ -1,44 +1,44 @@
-AST_ParseOperStruct
-AST_HandleEOL
-AST_ReadEqualRhsNames
-AST_HandleFor
+%comment_string
+%cste_string
+%equal_string
+%for_string
+%funcall_string
+%ifthenel_string
+%operatio_string
+%program_p
+%program_string
%variable_string
-AST_GetASTFile
-AST_HandleEndFor
+%while_string
AST2Ccode
-AST_GetFuncallPrm
-AST_HandleEndGenFun
+AST_CheckCommonInOutArgs
+AST_CheckLastFunc
AST_CheckLineLength
-SciFile2ASTFile
AST_CheckPrecSpecifier
-%operatio_string
-AST_HandleIfElse
+AST_DisplayStack
+AST_ExtractNameAndScope
+AST_GetASTFile
+AST_GetFuncallPrm
+AST_GetPrecAndLhsArg
+AST_HandleEOL
+AST_HandleEndFor
+AST_HandleEndGenFun
+AST_HandleEndProgram
AST_HandleEndWhile
-AST_CheckCommonInOutArgs
-AST_HandleWhileStatem
+AST_HandleFor
AST_HandleForStatem
-%ifthenel_string
+AST_HandleHeader
+AST_HandleIfElse
+AST_HandleWhileExpr
+AST_HandleWhileStatem
AST_ParseEqualStruct
-%while_string
-AST_GetPrecAndLhsArg
-AST_ExtractNameAndScope
-objectlist2string
-%comment_string
+AST_ParseFuncallStruct
+AST_ParseIfExprStruct
+AST_ParseOperStruct
AST_PopASTStack
-AST_CheckLastFunc
-GenOutArgNames
-%equal_string
-AST_ReadASTHeader
-%cste_string
-AST_HandleEndProgram
AST_PushASTStack
-AST_DisplayStack
-%funcall_string
-AST_HandleWhileExpr
-AST_ParseFuncallStruct
+AST_ReadASTHeader
+AST_ReadEqualRhsNames
+GenOutArgNames
Operator2FunName
-%program_p
-AST_HandleHeader
-AST_ParseIfExprStruct
-%program_string
-%for_string
+SciFile2ASTFile
+objectlist2string
diff --git a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin
index e262750a..40a8771d 100644
--- a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin
+++ b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_Funcall.sci b/2.3-1/macros/CCodeGeneration/C_Funcall.sci
index b130a622..166799e6 100644
--- a/2.3-1/macros/CCodeGeneration/C_Funcall.sci
+++ b/2.3-1/macros/CCodeGeneration/C_Funcall.sci
@@ -35,7 +35,7 @@ CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName;
CInitVarsFileName = FileInfo.Funct(nxtscifunnumber).CInitVarsFileName;
IndentLevel = SharedInfo.NIndent;
CCall = '';
-
+OutFormat = SharedInfo.OutFormat;
// --- Extract Function Info. ---
FunctionName = FunInfo.SCIFunctionName;
CFunName = FunInfo.CFunctionName;
@@ -371,7 +371,7 @@ else
if (FlagCall == 0)
// Add prototype to the header file
- C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName);
+ C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName,OutFormat);
// Add { at the beginning of the function.
PrintStringInfo(' {',ReportFileName,'file','y');
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin
index eb01ef65..98734690 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
index 45bb3564..72c7943e 100644
--- a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
index 41e13e45..1c2efd6a 100644
--- a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
@@ -1,4 +1,4 @@
-function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName)
+function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,OutFormat)
// function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName)
// -----------------------------------------------------------------
// //NUT: add description here
@@ -51,6 +51,12 @@ PrintStringInfo('extern ""C"" {',HeaderFileName,'file','y');
PrintStringInfo('#endif',HeaderFileName,'file','y');
PrintStringInfo('/*',HeaderFileName,'file','y');
PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo('# define ' + OutFormat + '1' ,HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
PrintStringInfo('** --- Prototypes. --- ',HeaderFileName,'file','y');
PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
PrintStringInfo('*/',HeaderFileName,'file','y');
diff --git a/2.3-1/macros/CCodeGeneration/C_Type.bin b/2.3-1/macros/CCodeGeneration/C_Type.bin
index 00c10704..c2ff6e65 100644
--- a/2.3-1/macros/CCodeGeneration/C_Type.bin
+++ b/2.3-1/macros/CCodeGeneration/C_Type.bin
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin b/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin
index 026863b2..61f446f3 100644
--- a/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin
+++ b/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.bin
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/lib b/2.3-1/macros/FunctionAnnotation/lib
index 78fb2f09..50f6251b 100644
--- a/2.3-1/macros/FunctionAnnotation/lib
+++ b/2.3-1/macros/FunctionAnnotation/lib
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/names b/2.3-1/macros/FunctionAnnotation/names
index e95bff5f..d9300d20 100644
--- a/2.3-1/macros/FunctionAnnotation/names
+++ b/2.3-1/macros/FunctionAnnotation/names
@@ -1,55 +1,55 @@
-FA_SZ_OPRC
-FA_SZ_OPLOGEQ
-FA_SZ_OPLOGLT
+FA_ADD
FA_DIV
-FA_SZ_OPCC
-FA_SZ_OPPLUS
-FA_TP_Z
-FA_SZ_OPLOGGE
-FA_MIN
-FA_MUL
-FA_SZ_OPLOGOR
-FA_SZ_OPSTAR
-FA_SZ_OPMINUS
-FA_SZ_SEL1
-FA_SZ_OPLOGNE
-FA_SZ_OPSLASH
-FA_SZ_OPDOTAPEX
-FA_SZ_OPBACKSLASH
-FA_GetFunAnn
-FA_SZ_OPDOTSLASH
-FA_SZ_OPPLUSA
-FA_MAX
FA_GetDefaultPrecision
-FA_SZ_OPHAT
-FA_TP_C
+FA_GetFunAnn
+FA_GetOutArgInfo
+FA_GetResizeApproach
FA_INT
-FA_TP_REAL
-FA_TP_USER
+FA_MAX
+FA_MIN
+FA_MUL
FA_REAL
-FA_TP_COMPLEX
-FA_ADD
-FA_TP_MIN_REAL
+FA_SUB
FA_SZ_1
-FA_SZ_OPDOTHAT
-FA_SZ_OPDOTBACKSLASH
-FA_TP_I
+FA_SZ_2
FA_SZ_FROM_VAL
+FA_SZ_OPAPEX
+FA_SZ_OPBACKSLASH
+FA_SZ_OPCC
+FA_SZ_OPDOTAPEX
+FA_SZ_OPDOTBACKSLASH
+FA_SZ_OPDOTHAT
+FA_SZ_OPDOTSLASH
+FA_SZ_OPDOTSTAR
+FA_SZ_OPHAT
FA_SZ_OPLOGAND
-FA_GetOutArgInfo
-FA_TP_S
-FA_TP_D
-FA_TP_MAX
-FA_SZ_2
-FA_SZ_SEL2
-FA_GetResizeApproach
+FA_SZ_OPLOGEQ
+FA_SZ_OPLOGGE
FA_SZ_OPLOGGT
-FA_SZ_OPDOTSTAR
-FA_SUB
-FA_SZ_OPLOGNOT
FA_SZ_OPLOGLE
-FA_SZ_OPAPEX
-FA_TP_UINT8
+FA_SZ_OPLOGLT
+FA_SZ_OPLOGNE
+FA_SZ_OPLOGNOT
+FA_SZ_OPLOGOR
+FA_SZ_OPMINUS
+FA_SZ_OPPLUS
+FA_SZ_OPPLUSA
+FA_SZ_OPRC
+FA_SZ_OPSLASH
+FA_SZ_OPSTAR
+FA_SZ_SEL1
+FA_SZ_SEL2
+FA_TP_C
+FA_TP_COMPLEX
+FA_TP_D
+FA_TP_I
+FA_TP_INT16
FA_TP_INT8
+FA_TP_MAX
+FA_TP_MIN_REAL
+FA_TP_REAL
+FA_TP_S
+FA_TP_UINT16
FA_TP_UINT8
-FA_TP_INT16
+FA_TP_USER
+FA_TP_Z
diff --git a/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
new file mode 100644
index 00000000..d9897fc3
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
@@ -0,0 +1,32 @@
+function AVRADCSetup(prescalar,adc_ref)
+// Function to initialise ADC of AVR
+//
+// Calling Sequence
+// AVRSetupADC(uint8 prescalar, uint8 adc_ref)
+//
+// Parameters
+// prescalar: prescalar to be used for generating ADC clock (0-7)
+// adc_ref : reference voltage to be used for ADC conversion
+// 0 -> Voltage on VREF pin
+// 1 -> Voltage on AVCC pin
+// 2 -> Internal 2.56 reference voltage
+//
+// Description
+// This function initialises ADc of AVR with given parameters. 'prescalar' is
+// needed for deciding ADC clock. ADC clock should be between 50KHz and 200KHz
+// and it given as (MCU clock/2^prescalar). Select appropriate prescalar depending
+// on MCU clock. 'adc_ref' selects one of the available reference voltage sources
+// available
+// Examples
+// AVRADCSetup(128,0)
+
+// See also
+// AVRReadADC
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for AVR.
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalOut.bin b/2.3-1/macros/Hardware/AVR/AVRDigitalOut.bin
new file mode 100644
index 00000000..7a09b0d8
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRDigitalOut.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci b/2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci
new file mode 100644
index 00000000..f17c8a07
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci
@@ -0,0 +1,32 @@
+function AVRDigitalOut(port,pin,state)
+// Function to change state (high\low) of a digital output pin on AVR
+//
+// Calling Sequence
+// AVRDigitalOut(port,pin,state)
+//
+// Parameters
+// port : port of microcontroller to be used
+// pin : pin of port (mentioned above) to be used
+// state : state to be outputed on pin (HIGH\LOW)
+//
+// Description
+// Each AVR microcontroller has pins which can be configured as digital
+// outputs. These are normally divided among some 'ports' (group of pins).
+// User has to select one of these port and which pin of that port as
+// digital output. Also, desired output state must be specified as
+// 'HIGH' or 'LOW'.
+//
+// Examples
+// AVRDigitalOut('A',0,HIGH)
+//
+// See also
+// AVRDigitalIn
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for AVR.
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.bin b/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.bin
new file mode 100644
index 00000000..98a592e3
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci b/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci
new file mode 100644
index 00000000..3de56c21
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci
@@ -0,0 +1,32 @@
+function AVRDigitalSetup(port,pin,direction)
+// Function to decide direction of a digital pin on AVR
+//
+// Calling Sequence
+// AVRDigitalSetup(port,pin,direction)
+//
+// Parameters
+// port : port of microcontroller to be used
+// pin : pin of port (mentioned above) to be used
+// direction : direction to be set for pin (INPUT\OUTPUT)
+//
+// Description
+// Each AVR microcontroller has pins which can be configured as digital
+// outputs/inputs. These are normally divided among some 'ports' (group of pins).
+// User has to select one of these port and which pin of that port to be
+// used as digital output/input. Also, desired direction must be specified as
+// 'INPUT' or 'OUTPUT'.
+//
+// Examples
+// AVRDigitalSetup('A',0,OUTPUT)
+//
+// See also
+// AVRDigitalIn AVRDigitalOut
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for AVR.
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/AVRReadADC.sci b/2.3-1/macros/Hardware/AVR/AVRReadADC.sci
new file mode 100644
index 00000000..f9dfdac0
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRReadADC.sci
@@ -0,0 +1,31 @@
+function AVRReadADC(channel)
+// Function to get voltage on analog pin on AVR
+//
+// Calling Sequence
+// u8AVRReadADCs(channel)
+//
+// Parameters
+// channel : Select which channel is to be read. Values from 0-7 select one
+// of the pins ADC0-ADC7. For other possible channel values refer
+// datasheet
+// Returns->
+// result : Digital value for the voltage present on channel selected
+//
+// Description
+// This function returns digital value for present on adc pins. 'channel'
+// selects which of the ADC0-ADC7 is to be used for reading analog value.
+// Apart from reading just ADC0-ADC7 other it can also read differential
+// voltages between some pins. For channel values for those options, please
+// refer datasheet.
+//
+// Examples
+// adc_result = u8AVRReadADC(0) //Read ADC0
+//
+// Authors
+// Siddhesh Wani
+//
+
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for AVR.
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.bin b/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.bin
new file mode 100644
index 00000000..eed8be3b
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci b/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci
new file mode 100644
index 00000000..50a913fa
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci
@@ -0,0 +1,16 @@
+function AVRSupportFunctions = GetAVRSupportFunctions()
+// -----------------------------------------------------------------
+// Get list of AVR peripherals supported
+//
+// Input data:
+// None
+//
+// Output data:
+// None
+//
+// Author: Siddhesh Wani
+// -----------------------------------------------------------------
+
+AVRSupportFunctions = ["AVRDigitalOut"];
+
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/GetPeripheral.bin b/2.3-1/macros/Hardware/AVR/GetPeripheral.bin
new file mode 100644
index 00000000..b496bbb0
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/GetPeripheral.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/GetPeripheral.sci b/2.3-1/macros/Hardware/AVR/GetPeripheral.sci
new file mode 100644
index 00000000..73e9f19e
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/GetPeripheral.sci
@@ -0,0 +1,21 @@
+function Peripheral = GetPeripheral(FunName,InArg)
+// -----------------------------------------------------------------
+// Get an acronym for peripheral being used to be inserted in list of
+// used peripherals
+//
+// Input data:
+// FunName: Name of the function to be checked
+// InArg:Input arguements passed to function 'FunName'
+//
+// Output data:
+// Peripheral: Acronym for peripheral to be initialised
+//
+// Author: Siddhesh Wani
+// -----------------------------------------------------------------
+
+//select FunName
+
+//case AVRDigitalOut:
+// Peripheral = list('PORT', InArg(1),InArg(2)];
+//end
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.bin b/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.bin
new file mode 100644
index 00000000..c49f4e04
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci b/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci
new file mode 100644
index 00000000..bafc5935
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci
@@ -0,0 +1,17 @@
+function InsertPeripheralInList(Peripheral,PeripheralListFile)
+// -----------------------------------------------------------------
+// Insert input peripheral in peripherals' list
+//
+// Input data:
+// Peripheral: Peripheral of type 'list' to be instertd in list
+// PeripheralListFile: Name of file containing list of peripheral used
+//
+// Output data:
+// None
+//
+// Author: Siddhesh Wani
+// -----------------------------------------------------------------
+
+load(PeripheralListFile,'PheripheralList');
+
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.bin b/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.bin
new file mode 100644
index 00000000..e2382308
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci b/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci
new file mode 100644
index 00000000..a4cbbc88
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci
@@ -0,0 +1,22 @@
+function Output = IsAVRSupportFunction(FunName)
+// -----------------------------------------------------------------
+// Check whether input function name is an AVR support function or not.
+//
+// Input data:
+// FunName: Name of the function to be checked
+//
+// Output data:
+// Output: True or False depending whether given function is an AVR
+// support functions or not
+//
+// Author: Siddhesh Wani
+// -----------------------------------------------------------------
+
+//Get list of supported functions for AVR
+AVRSupportFunctions = GetAVRSupportFunctions();
+
+//Check whether input function is present in above list or not
+FunNameInAVRSupport = members(FunName,AVRSupportFunctions);
+Output = bool2s(FunNameInAVRSupport~=0);
+
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/buildmacros.sce b/2.3-1/macros/Hardware/AVR/buildmacros.sce
new file mode 100644
index 00000000..60fd2843
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/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/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib
new file mode 100644
index 00000000..097a89f0
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/names b/2.3-1/macros/Hardware/AVR/names
new file mode 100644
index 00000000..4b941e9b
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/names
@@ -0,0 +1,6 @@
+AVRDigitalOut
+AVRDigitalSetup
+GetAVRSupportFunctions
+GetPeripheral
+InsertPeripheralInList
+IsAVRSupportFunction
diff --git a/2.3-1/macros/Hardware/buildmacros.sce b/2.3-1/macros/Hardware/buildmacros.sce
new file mode 100644
index 00000000..88f0fb2a
--- /dev/null
+++ b/2.3-1/macros/Hardware/buildmacros.sce
@@ -0,0 +1,19 @@
+// This file is released into the public domain
+
+Directories = [ "AVR" ];
+
+
+current_path_buildmacros = get_absolute_file_path("buildmacros.sce");
+
+for K=1:size(Directories,"*")
+ myfile = current_path_buildmacros + filesep() + Directories(K) + filesep() + "buildmacros.sce";
+ if isfile(myfile) then
+ exec(myfile);
+ end
+end
+
+clear current_path_buildmacros;
+
+tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
+
+clear tbx_build_macros;
diff --git a/2.3-1/macros/ToolInitialization/INIT_CreateDirs.bin b/2.3-1/macros/ToolInitialization/INIT_CreateDirs.bin
index 5c17670b..14dfb49c 100644
--- a/2.3-1/macros/ToolInitialization/INIT_CreateDirs.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_CreateDirs.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
index 68968b59..a85721c0 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 84c71b4c..067a332c 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -3981,6 +3981,62 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---Functions for AVR ---------------
+//------------------------------------
+
+
+//------------------------------------
+//---- Class AVRDigitalSetup ---------
+//------------------------------------
+ClassName = 'AVRDigitalSetup';
+
+// --- 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('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class AVRDigitalOut -----------
+//------------------------------------
+ClassName = 'AVRDigitalOut';
+
+// --- 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('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalOut';
+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_GenAnnFLFunctions.bin b/2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin
index 6220b291..f80837e1 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.bin b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.bin
index dc4c3fe9..db8c34ba 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 743f6471..753509e3 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci
@@ -108,4 +108,10 @@ FileInfo.GeneralReport = fullfile(FileInfo.WorkingDir,'SCI2CGeneralReport.txt');
FileInfo.CStyleSCI2CMainDir = pathconvert(FileInfo.SCI2CMainDir, %f, %f, 'u');
FileInfo.CStyleOutCCCodeDir = pathconvert(OutCCCodeDir, %f, %f, 'u');
FileInfo.MakefileFilename = fullfile(FileInfo.CStyleOutCCCodeDir,'Makefile');
+
+//-------------------------
+//----Hardware related-----
+//-------------------------
+FileInfo.PeripheralInitListFile = fullfile(FileInfo.WorkingDir,'PeripheralInit.dat');
+
endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenLibraries.bin b/2.3-1/macros/ToolInitialization/INIT_GenLibraries.bin
index 2df9a4fd..f6059c98 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenLibraries.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_GenLibraries.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin
index ce14906c..42b16627 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.bin b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.bin
index 0a48d061..fbbb6414 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_RemoveDirs.bin b/2.3-1/macros/ToolInitialization/INIT_RemoveDirs.bin
index fc036951..0740d242 100644
--- a/2.3-1/macros/ToolInitialization/INIT_RemoveDirs.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_RemoveDirs.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin b/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
index 22ac0148..b0b849b8 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 4065d047..0340d6ff 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
@@ -144,6 +144,12 @@ SharedInfoDatFile = FileInfo.SharedInfoDatFile;
global anscounter; //NUT: just to fix problem with ans variables.
anscounter = 0;
+//--------------------------------------------
+//---Hardware related initialisation----------
+//--------------------------------------------
+PeripheralList = list();
+save(FileInfo.PeripheralInitListFile, 'PeripheralList');
+
endfunction
// #RNU_RES_B
//NUT: quando genero il c della funzione utente devo anche generare il corrispondente file delle includes.
diff --git a/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.bin b/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.bin
index 55ef7bbc..5aeaa274 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/ManageNextConversion.bin b/2.3-1/macros/ToolInitialization/ManageNextConversion.bin
index 60555762..75360d7b 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/UpdateSCI2CInfo.bin b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin
index 4a06ba27..3acb88aa 100644
--- a/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin
+++ b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/lib b/2.3-1/macros/ToolInitialization/lib
index 3db49c1c..6d909b02 100644
--- a/2.3-1/macros/ToolInitialization/lib
+++ b/2.3-1/macros/ToolInitialization/lib
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/names b/2.3-1/macros/ToolInitialization/names
index 0c264f0f..71a724d3 100644
--- a/2.3-1/macros/ToolInitialization/names
+++ b/2.3-1/macros/ToolInitialization/names
@@ -1 +1,14 @@
+INIT_CreateDirs
INIT_FillSCI2LibCDirs
+INIT_GenAnnFLFunctions
+INIT_GenFileInfo
+INIT_GenLibraries
+INIT_GenSharedInfo
+INIT_LoadLibraries
+INIT_RemoveDirs
+INIT_SCI2C
+INIT_SharedInfoEqual
+ManageNextConversion
+UpdateSCI2CInfo
+doublecomplex
+floatcomplex
diff --git a/2.3-1/macros/buildmacros.sce b/2.3-1/macros/buildmacros.sce
index 41e3ace0..627e6384 100644
--- a/2.3-1/macros/buildmacros.sce
+++ b/2.3-1/macros/buildmacros.sce
@@ -8,7 +8,8 @@ Directories = [ "ASTManagement", ...
"FunctionList", ...
"GeneralFunctions", ...
"SymbolTable", ...
- "ToolInitialization" ];
+ "ToolInitialization"...
+ "Hardware" ];
current_path_buildmacros = get_absolute_file_path("buildmacros.sce");
diff --git a/2.3-1/macros/cb_sci2c_gui.bin b/2.3-1/macros/cb_sci2c_gui.bin
index a1e97832..00bf3684 100644
--- a/2.3-1/macros/cb_sci2c_gui.bin
+++ b/2.3-1/macros/cb_sci2c_gui.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllHeaders.bin b/2.3-1/macros/findDeps/getAllHeaders.bin
index e9992fd4..6c4c15f7 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.bin
+++ b/2.3-1/macros/findDeps/getAllHeaders.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci
index e152514b..f5c74bd0 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.sci
+++ b/2.3-1/macros/findDeps/getAllHeaders.sci
@@ -136,10 +136,17 @@ function allHeaders = getAllHeaders(OutFormat)
"src/c/scilab-arduino/includes/cmd_analog_in.h"
"src/c/scilab-arduino/includes/sleep.h"];
+ AVR_headers = [
+ "src/c/hardware/avr/includes/AVRPeripheralGPIO.h"
+ "src/c/hardware/avr/includes/AVRPeripheralADC.h"
+ ];
+
if OutFormat == "StandAlone"
allHeaders = Standalone_headers;
elseif OutFormat == "Arduino"
allHeaders = cat(1,Standalone_headers, Arduino_headers);
+ elseif OutFormat == "AVR"
+ allHeaders = cat(1,Standalone_headers, AVR_headers);
end
endfunction
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.bin b/2.3-1/macros/findDeps/getAllInterfaces.bin
index c607ea19..ec75338c 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.bin
+++ b/2.3-1/macros/findDeps/getAllInterfaces.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci
index b32bb652..5b52c71a 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.sci
+++ b/2.3-1/macros/findDeps/getAllInterfaces.sci
@@ -129,10 +129,18 @@ function allInterfaces = getAllInterfaces(OutFormat)
"src/c/scilab-arduino/interfaces/int_cmd_analog_in.h"
"src/c/scilab-arduino/interfaces/int_sleep.h"];
+ //Interface files required for "AVR" output
+ AVR_interfaces = [
+ "src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h"
+ "src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h"
+ ];
+
if OutFormat == "StandAlone"
allInterfaces = Standalone_interfaces;
elseif OutFormat == "Arduino"
allInterfaces = cat(1,Standalone_interfaces, Arduino_interfaces);
+ elseif OutFormat == "AVR"
+ allInterfaces = cat(1,Standalone_interfaces, AVR_interfaces);
end
endfunction
diff --git a/2.3-1/macros/findDeps/getAllSources.bin b/2.3-1/macros/findDeps/getAllSources.bin
index 1d698a0e..6c3f91f5 100644
--- a/2.3-1/macros/findDeps/getAllSources.bin
+++ b/2.3-1/macros/findDeps/getAllSources.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci
index 356ba38e..956f7be1 100644
--- a/2.3-1/macros/findDeps/getAllSources.sci
+++ b/2.3-1/macros/findDeps/getAllSources.sci
@@ -823,10 +823,24 @@ function allSources = getAllSources(OutFormat)
"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"];
+
+ //Files to be inserted only if output format selected is 'AVR'.
+ AVR_files = [
+ "src/c/hardware/avr/gpio/u8AVRDigitalSetups.c"
+ "src/c/hardware/avr/gpio/u8AVRDigitalOuts.c"
+ "src/c/hardware/avr/gpio/u8AVRDigitalIns.c"
+ "src/c/hardware/avr/adc/u8AVRADCSetups.c"
+ "src/c/hardware/avr/adc/u8AVRReadADCs.c"
+ "src/c/scilab-arduino/sleep/u16sleeps.c"
+ ];
+
+
if OutFormat == "StandAlone"
allSources = Standalone_files;
elseif OutFormat == "Arduino"
allSources = cat(1,Standalone_files, Arduino_files);
+ elseif OutFormat == "AVR"
+ allSources = cat(1,Standalone_files, AVR_files);
end
endfunction
diff --git a/2.3-1/macros/findDeps/getArduinoFiles.bin b/2.3-1/macros/findDeps/getArduinoFiles.bin
index 3becbac7..c762c303 100644
--- a/2.3-1/macros/findDeps/getArduinoFiles.bin
+++ b/2.3-1/macros/findDeps/getArduinoFiles.bin
Binary files differ
diff --git a/2.3-1/macros/lib b/2.3-1/macros/lib
index 419931c4..8fbf4888 100644
--- a/2.3-1/macros/lib
+++ b/2.3-1/macros/lib
Binary files differ
diff --git a/2.3-1/macros/names b/2.3-1/macros/names
index b7a78575..a126347e 100644
--- a/2.3-1/macros/names
+++ b/2.3-1/macros/names
@@ -1,6 +1,6 @@
cb_sci2c_gui
getScilab2cVersion
runsci2c
+runscicode
sci2c_gui
scilab2c
-runscicode
diff --git a/2.3-1/macros/runsci2c.bin b/2.3-1/macros/runsci2c.bin
index 2cc69e9e..053c3311 100644
--- a/2.3-1/macros/runsci2c.bin
+++ b/2.3-1/macros/runsci2c.bin
Binary files differ
diff --git a/2.3-1/macros/runsci2c.sci b/2.3-1/macros/runsci2c.sci
index 880cc9d8..ac826a3a 100644
--- a/2.3-1/macros/runsci2c.sci
+++ b/2.3-1/macros/runsci2c.sci
@@ -105,7 +105,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
@@ -113,7 +113,7 @@ end
PrintStepInfo('Copying headers', FileInfo.GeneralReport,'both');
for i = 1:size(allHeaders, "*")
// DEBUG only
- // disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
+ disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
copyfile(allHeaders(i), SCI2COutputPath+"/includes/");
end
@@ -121,7 +121,7 @@ end
PrintStepInfo('Copying interfaces', FileInfo.GeneralReport,'both');
for i = 1:size(allInterfaces, "*")
// DEBUG only
- //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
+ disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
copyfile(allInterfaces(i), SCI2COutputPath+"/interfaces/");
end
diff --git a/2.3-1/macros/sci2c_gui.bin b/2.3-1/macros/sci2c_gui.bin
index 1c1b69c9..9bdf607c 100644
--- a/2.3-1/macros/sci2c_gui.bin
+++ b/2.3-1/macros/sci2c_gui.bin
Binary files differ
diff --git a/2.3-1/macros/scilab2c.bin b/2.3-1/macros/scilab2c.bin
index 7416eb5f..e9fb5faa 100644
--- a/2.3-1/macros/scilab2c.bin
+++ b/2.3-1/macros/scilab2c.bin
Binary files differ
diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci
index 1d4675e3..64d5753f 100644
--- a/2.3-1/macros/scilab2c.sci
+++ b/2.3-1/macros/scilab2c.sci
@@ -143,9 +143,9 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
// --- LAUNCH USER SCI CODE TO TEST IT BEFORE TRANSLATING IT!!! ---
- if OutFormat == "StandAlone"
- runscicode(UserScilabMainFile, UserSciFilesPaths);
- end
+// if OutFormat == "StandAlone"
+// runscicode(UserScilabMainFile, UserSciFilesPaths);
+// end
// --- ASK USER FOR CONTINUATION. ---
// Do not open confirmation box if we are not in STD mode.
@@ -156,7 +156,7 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
end
if (userchoice == 1)
// --- LAUNCH SCI2C ---
- runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,OutFormat);
+ runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,'AVR');
end
endfunction
diff --git a/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c b/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c
new file mode 100644
index 00000000..620f80fe
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c
@@ -0,0 +1,42 @@
+// Function to initialise ADC of AVR
+//
+// Calling Sequence
+// AVRSetupADC(uint8 prescalar, uint8 adc_ref)
+//
+// Parameters
+// prescalar: prescalar to be used for generating ADC clock (0-7)
+// adc_ref : reference voltage to be used for ADC conversion
+// 0 -> Voltage on VREF pin
+// 1 -> Voltage on AVCC pin
+// 2 -> Internal 2.56 reference voltage
+//
+// Description
+// This function initialises ADc of AVR with given parameters. 'prescalar' is
+// needed for deciding ADC clock. ADC clock should be between 50KHz and 200KHz
+// and it given as (MCU clock/2^prescalar). Select appropriate prescalar depending
+// on MCU clock. 'adc_ref' selects one of the available reference voltage sources
+// available
+// Examples
+// AVRADCSetup(128,0)
+//
+// Authors
+// Siddhesh Wani
+//
+
+#include "AVRPeripheralADC.h"
+
+
+uint8 u8AVRADCSetups(uint8 prescalar, uint8 adc_ref)
+{
+ /*Set the prescalar value*/
+ ADCSRA |= (prescalar & 0x07);
+
+ /*Set the adc reference voltage*/
+ ADMUX |= ((adc_ref & 0x03) << 6);
+
+ /*Enable ADC hardware. Set ADEN bit*/
+ ADCSRA |= (1<<7);
+
+ return 0;
+}
+
diff --git a/2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c b/2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c
new file mode 100644
index 00000000..71fe1363
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c
@@ -0,0 +1,46 @@
+// Function to get voltage on analog pin on AVR
+//
+// Calling Sequence
+// u8AVRReadADCs(channel)
+//
+// Parameters
+// channel : Select which channel is to be read. Values from 0-7 select one
+// of the pins ADC0-ADC7. For other possible channel values refer
+// datasheet
+// Returns->
+// result : Digital value for the voltage present on channel selected
+//
+// Description
+// This function returns digital value for present on adc pins. 'channel'
+// selects which of the ADC0-ADC7 is to be used for reading analog value.
+// Apart from reading just ADC0-ADC7 other it can also read differential
+// voltages between some pins. For channel values for those options, please
+// refer datasheet.
+//
+// Examples
+// adc_result = u8AVRReadADC(0) //Read ADC0
+//
+// Authors
+// Siddhesh Wani
+//
+
+
+#include "AVRPeripheralADC.h"
+
+uint16 u8AVRReadADCs(uint8 channel)
+{
+ /*Set ADC conversion channel*/
+ ADMUX |= (channel & 0x1F);
+
+ /*Start ADC conversion. Set 'ADSC' bit*/
+ ADCSRA |= (1<<6);
+
+ /*Wait for conversion to complete. Check 'ADIF' bit*/
+ while(!(ADCSRA & (1<<4)));
+
+ /*Clear ADIF flag*/
+ ADCSRA |= (1<<4);
+
+ /*ADC conversion result is stored in ADCH/L registers*/
+ return (ADC);
+}
diff --git a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c
new file mode 100644
index 00000000..6b61a56b
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c
@@ -0,0 +1,54 @@
+// Function to get current state (high\low) of a digital pin on AVR
+//
+// Calling Sequence
+// u8AVRDigitalIns(port,pin)
+//
+// Parameters
+// port : port of microcontroller to be used (1 for PORTA, 2 for PORTB,...)
+// pin : pin of port (mentioned above) to be used
+// Returns->
+// state : state of the pin (0 for low and 1 for high)
+//
+// Description
+// Each AVR microcontroller has pins which can be configured as digital
+// outputs. These are normally divided among some 'ports' (group of pins).
+// User has to select one of these port and which pin of that port is to
+// be read. Function returns current state of the pin '1' (high) or '0' (low).
+//
+//
+// Examples
+// state = u8AVRDigitalIns(1,0)
+//
+// Authors
+// Siddhesh Wani
+//
+
+
+#include "AVRPeripheralGPIO.h"
+
+uint8 u8AVRDigitalIns(uint8 port,uint8 pin)
+{
+ uint8 state = 0;
+ if(port == PORT_A)
+ {
+ state = (uint8)(PINA & (1<<pin));
+ return state;
+ }
+ if(port == PORT_B)
+ {
+ state = (uint8)(PINB & (1<<pin));
+ return state;
+ }
+ if(port == PORT_C)
+ {
+ state = (uint8)(PINC & (1<<pin));
+ return state;
+ }
+ if(port == PORT_D)
+ {
+ state = (uint8)(PIND & (1<<pin));
+ return state;
+ }
+
+//return state;
+}
diff --git a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c
new file mode 100644
index 00000000..5ee84a80
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c
@@ -0,0 +1,69 @@
+// Function to change state (high\low) of a digital output pin on AVR
+//
+// Calling Sequence
+// u8AVRDigitalOuts(port,pin,state)
+//
+// Parameters
+// port : port of microcontroller to be used (1 for PORTA, 2 for PORTB,...)
+// pin : pin of port (mentioned above) to be used
+// state : state to be outputed on pin (0 for low and 1 for high)
+//
+// Description
+// Each AVR microcontroller has pins which can be configured as digital
+// outputs. These are normally divided among some 'ports' (group of pins).
+// User has to select one of these port and which pin of that port as
+// digital output. Also, desired output state must be specified as
+// '1' (high) or '0' (low).
+//
+// Examples
+// u8AVRDigitalOuts(1,0,1)
+//
+// Authors
+// Siddhesh Wani
+//
+
+
+#include "AVRPeripheralGPIO.h"
+
+uint8 u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state)
+{
+ if(state == LOW)
+ {/*Make output pin high*/
+ if(port == PORT_A)
+ {
+ PORTA = PORTA & ~(1<<pin);
+ }
+ if(port == PORT_B)
+ {
+ PORTB = PORTB & ~(1<<pin);
+ }
+ if(port == PORT_C)
+ {
+ PORTC = PORTC & ~(1<<pin);
+ }
+ if(port == PORT_D)
+ {
+ PORTD = PORTD & ~(1<<pin);
+ }
+ }
+ else
+ {/*Make output pin high*/
+ if(port == PORT_A)
+ {
+ PORTA = PORTA | (1<<pin);
+ }
+ if(port == PORT_B)
+ {
+ PORTB = PORTB | (1<<pin);
+ }
+ if(port == PORT_C)
+ {
+ PORTC = PORTC | (1<<pin);
+ }
+ if(port == PORT_D)
+ {
+ PORTD = PORTD | (1<<pin);
+ }
+ }
+return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalSetups.c b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalSetups.c
new file mode 100644
index 00000000..46697f70
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalSetups.c
@@ -0,0 +1,71 @@
+// Function to decide direction of a digital pin on AVR
+//
+// Calling Sequence
+// AVRDigitalSetup(port,pin,direction)
+//
+// Parameters
+// port : port of microcontroller to be used (1 for PORTA, 2 for PORTB,...)
+// pin : pin of port (mentioned above) to be used
+// direction : direction to be set for pin (0 for input, 1 for output)
+//
+// Description
+// Each AVR microcontroller has pins which can be configured as digital
+// outputs/inputs. These are normally divided among some 'ports' (group of pins).
+// User has to select one of these port and which pin of that port to be
+// used as digital output/input. Also, desired direction must be specified as
+// 'INPUT' or 'OUTPUT'.
+//
+// Examples
+// AVRDigitalSetup(1,0,1)
+//
+// Authors
+// Siddhesh Wani
+//
+
+#include "AVRPeripheralGPIO.h"
+
+
+uint8 u8AVRDigitalSetups(uint8 port,uint8 pin,uint8 direction)
+{
+
+ if (direction == INPUT)
+ {/*Set pin as input*/
+ if(port == PORT_A)
+ {
+ DDRA = DDRA & ~(1<<pin);
+ }
+ if(port == PORT_B)
+ {
+ DDRB = DDRB & ~(1<<pin);
+ }
+ if(port == PORT_C)
+ {
+ DDRC = DDRC & ~(1<<pin);
+ }
+ if(port == PORT_D)
+ {
+ DDRD = DDRD & ~(1<<pin);
+ }
+ }
+ else
+ {/*Set pin as output*/
+ if(port == PORT_A)
+ {
+ DDRA = DDRA | (1<<pin);
+ }
+ if(port == PORT_B)
+ {
+ DDRB = DDRB | (1<<pin);
+ }
+ if(port == PORT_C)
+ {
+ DDRC = DDRC | (1<<pin);
+ }
+ if(port == PORT_D)
+ {
+ DDRD = DDRD | (1<<pin);
+ }
+ }
+return 0;
+}
+
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h
new file mode 100644
index 00000000..e343de63
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h
@@ -0,0 +1,27 @@
+//This file defines constants corresponding to gpios and digital input functions.
+//
+// Authors
+// Siddhesh Wani
+//
+
+#ifndef __AVRPERIPHERALADC_H__
+#define __AVRPERIPHERALADC_H__
+
+#include <avr/io.h>
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//Function prototypes
+uint8 u8AVRADCSetups(uint8 prescalar, uint8 adc_ref);
+
+uint16 u8AVRReadADCs(uint8 channel);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__AVRPERIPHERALGPIO_H__ */
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h
new file mode 100644
index 00000000..ddbeb2d8
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h
@@ -0,0 +1,45 @@
+//This file defines constants corresponding to gpios and digital input functions.
+//
+// Authors
+// Siddhesh Wani
+//
+
+#ifndef __AVRPERIPHERALGPIO_H__
+#define __AVRPERIPHERALGPIO_H__
+
+#include <avr/io.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <avr/io.h>
+#include "types.h"
+
+//Port definitions
+#define PORT_A 1
+#define PORT_B 2
+#define PORT_C 3
+#define PORT_D 4
+
+//Direction definitions
+#define INPUT 0
+#define OUTPUT 1
+
+//Pin state definitions
+#define LOW 0
+#define HIGH 1
+
+//Function prototypes
+uint8 u8AVRDigitalSetups(uint8 port,uint8 pin,uint8 direction);
+
+uint8 u8AVRDigitalIns(uint8 port,uint8 pin);
+
+uint8 u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__AVRPERIPHERALGPIO_H__ */
diff --git a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h
new file mode 100644
index 00000000..073f8a0c
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h
@@ -0,0 +1,26 @@
+//This file defines constants corresponding to gpios.
+//
+// Authors
+// Siddhesh Wani
+//
+
+#ifndef __INT_AVRPERIPHERALADC_H__
+#define __INT_AVRPERIPHERALADC_H__
+
+#include <avr/io.h>
+#include "AVRPeripheralADC.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0AVRDigitalSetupu80(in1,in2) u8AVRADCSetups((uint8) in1,\
+ (uint8) in2);
+
+#define d0AVRDigitalOutu160(in1) u8AVRReadADC((uint8) in1);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__AVRPERIPHERALADC_H__ */
diff --git a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h
new file mode 100644
index 00000000..88e4c635
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h
@@ -0,0 +1,30 @@
+//This file defines constants corresponding to gpios.
+//
+// Authors
+// Siddhesh Wani
+//
+
+#ifndef __INT_AVRPERIPHERALGPIO_H__
+#define __INT_AVRPERIPHERALGPIO_H__
+
+#include <avr/io.h>
+#include "AVRPeripheralGPIO.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0d0AVRDigitalSetupu80(in1,in2,in3) u8AVRDigitalSetups((uint8) in1,\
+ (uint8) in2, (uint8) in3);
+
+#define d0d0AVRDigitalOutu80(in1,in2) u8AVRDigitalIns((uint8) in1,\
+ (uint8) in2);
+
+#define d0d0d0AVRDigitalOutu80(in1,in2,in3) u8AVRDigitalOuts((uint8) in1,\
+ (uint8) in2, (uint8) in3);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__AVRPERIPHERALGPIO_H__ */
diff --git a/2.3-1/src/c/operations/addition/i8adda.c b/2.3-1/src/c/operations/addition/i8adda.c
new file mode 100644
index 00000000..2417bda7
--- /dev/null
+++ b/2.3-1/src/c/operations/addition/i8adda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - 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
+ *
+ */
+
+#include "addition.h"
+
+void i8adda(int8* in1, int size1, int8* in2, int size2, int8* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = i8adds(in1[i], in2[i]);
+ }
+}
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
index fdc1728d..4585f12a 100644
--- a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
@@ -25,7 +25,7 @@ extern "C" {
//Required when input from one pin is directed to other output pin.
#define d0d0u80cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\
- (uint8)in2, in3)
+ (uint8)in2, (uint8)in3)
#ifdef __cplusplus
diff --git a/2.3-1/unloader.sce b/2.3-1/unloader.sce
new file mode 100644
index 00000000..a8bf1673
--- /dev/null
+++ b/2.3-1/unloader.sce
@@ -0,0 +1,14 @@
+// This file is released under the 3-clause BSD license. See COPYING-BSD.
+// Generated by builder.sce: Please, do not edit this file
+
+try
+ getversion("scilab");
+catch
+ error("Scilab 5.4 or more is required.");
+end;
+
+fileQuit = get_absolute_file_path("unloader.sce") + "etc/" + "scilab2c.quit";
+if isfile(fileQuit) then
+ exec(fileQuit);
+end
+