diff options
author | siddhu8990 | 2015-09-15 14:47:02 +0530 |
---|---|---|
committer | siddhu8990 | 2015-09-15 14:47:02 +0530 |
commit | e929ae3e4254caac2d29a832ee75d4ed8ae4a380 (patch) | |
tree | bc09b45e76c3b62b8249caf8cf7981f38d4da47e | |
parent | fa48de77a489b8b6e7c5cb335b8dc55721cf2a28 (diff) | |
download | Scilab2C_fossee_old-e929ae3e4254caac2d29a832ee75d4ed8ae4a380.tar.gz Scilab2C_fossee_old-e929ae3e4254caac2d29a832ee75d4ed8ae4a380.tar.bz2 Scilab2C_fossee_old-e929ae3e4254caac2d29a832ee75d4ed8ae4a380.zip |
Working arduino digital input and output
26 files changed, 30 insertions, 2 deletions
diff --git a/includes/sci2clib.h b/includes/sci2clib.h index b887ebb..aa6a9cc 100644 --- a/includes/sci2clib.h +++ b/includes/sci2clib.h @@ -332,8 +332,12 @@ /*Scilab-arduino toolbox*/ #include "int_cmd_digital_out.h" #include "cmd_digital_out.h" +#include "int_cmd_digital_in.h" +#include "cmd_digital_in.h" #include "int_cmd_analog_out.h" #include "cmd_analog_out.h" +#include "int_cmd_analog_in.h" +#include "cmd_analog_in.h" #include "int_sleep.h" #include "sleep.h" diff --git a/macros/CCodeGeneration/.fuse_hidden00001d2200000003 b/macros/CCodeGeneration/.fuse_hidden00001d2200000003 Binary files differnew file mode 100644 index 0000000..02f578e --- /dev/null +++ b/macros/CCodeGeneration/.fuse_hidden00001d2200000003 diff --git a/macros/CCodeGeneration/C_FinalizeCode.bin b/macros/CCodeGeneration/C_FinalizeCode.bin Binary files differindex a2e3e12..133956e 100644 --- a/macros/CCodeGeneration/C_FinalizeCode.bin +++ b/macros/CCodeGeneration/C_FinalizeCode.bin diff --git a/macros/CCodeGeneration/C_GenerateMakefile.bin b/macros/CCodeGeneration/C_GenerateMakefile.bin Binary files differindex bbb2cea..d4164e6 100644 --- a/macros/CCodeGeneration/C_GenerateMakefile.bin +++ b/macros/CCodeGeneration/C_GenerateMakefile.bin diff --git a/macros/CCodeGeneration/C_InitHeader.bin b/macros/CCodeGeneration/C_InitHeader.bin Binary files differindex 0147576..0673399 100644 --- a/macros/CCodeGeneration/C_InitHeader.bin +++ b/macros/CCodeGeneration/C_InitHeader.bin diff --git a/macros/CCodeGeneration/C_Type.bin b/macros/CCodeGeneration/C_Type.bin Binary files differindex 36a9458..424c615 100644 --- a/macros/CCodeGeneration/C_Type.bin +++ b/macros/CCodeGeneration/C_Type.bin diff --git a/macros/ToolInitialization/.fuse_hidden00002d5800000006 b/macros/ToolInitialization/.fuse_hidden00002d5800000006 Binary files differdeleted file mode 100644 index 406f6f5..0000000 --- a/macros/ToolInitialization/.fuse_hidden00002d5800000006 +++ /dev/null diff --git a/macros/ToolInitialization/INIT_CreateDirs.bin b/macros/ToolInitialization/INIT_CreateDirs.bin Binary files differindex 2925a70..e180f6e 100644 --- a/macros/ToolInitialization/INIT_CreateDirs.bin +++ b/macros/ToolInitialization/INIT_CreateDirs.bin diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index eafc416..792ef65 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -1375,6 +1375,15 @@ PrintStringInfo('z2d2'+ArgSeparator+'d2',ClassFileName,'file','y'); PrintStringInfo('d2z2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('s2c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('d0i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('d0u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('d0i160'+ArgSeparator+'i160',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
FunctionName = 'OpLogEq'; // BJ : Done AS : Float_Done
@@ -3769,6 +3778,7 @@ 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 = 'cmd_digital_out';
diff --git a/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin b/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin Binary files differindex 3f8981a..b0cff95 100644 --- a/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin +++ b/macros/ToolInitialization/INIT_GenAnnFLFunctions.bin diff --git a/macros/ToolInitialization/INIT_GenFileInfo.bin b/macros/ToolInitialization/INIT_GenFileInfo.bin Binary files differindex 733ab51..e5a9ae2 100644 --- a/macros/ToolInitialization/INIT_GenFileInfo.bin +++ b/macros/ToolInitialization/INIT_GenFileInfo.bin diff --git a/macros/ToolInitialization/INIT_GenLibraries.bin b/macros/ToolInitialization/INIT_GenLibraries.bin Binary files differindex a1bf6f5..de7d66e 100644 --- a/macros/ToolInitialization/INIT_GenLibraries.bin +++ b/macros/ToolInitialization/INIT_GenLibraries.bin diff --git a/macros/ToolInitialization/INIT_GenSharedInfo.bin b/macros/ToolInitialization/INIT_GenSharedInfo.bin Binary files differindex 9c82bde..28e3e32 100644 --- a/macros/ToolInitialization/INIT_GenSharedInfo.bin +++ b/macros/ToolInitialization/INIT_GenSharedInfo.bin diff --git a/macros/ToolInitialization/INIT_LoadLibraries.bin b/macros/ToolInitialization/INIT_LoadLibraries.bin Binary files differindex 35bc6a1..65cd4c0 100644 --- a/macros/ToolInitialization/INIT_LoadLibraries.bin +++ b/macros/ToolInitialization/INIT_LoadLibraries.bin diff --git a/macros/ToolInitialization/INIT_RemoveDirs.bin b/macros/ToolInitialization/INIT_RemoveDirs.bin Binary files differindex 5a3cc93..4982a1e 100644 --- a/macros/ToolInitialization/INIT_RemoveDirs.bin +++ b/macros/ToolInitialization/INIT_RemoveDirs.bin diff --git a/macros/ToolInitialization/INIT_SCI2C.bin b/macros/ToolInitialization/INIT_SCI2C.bin Binary files differindex 1c2b2d3..b3a3aaa 100644 --- a/macros/ToolInitialization/INIT_SCI2C.bin +++ b/macros/ToolInitialization/INIT_SCI2C.bin diff --git a/macros/ToolInitialization/INIT_SharedInfoEqual.bin b/macros/ToolInitialization/INIT_SharedInfoEqual.bin Binary files differindex 6737e64..b0f6e77 100644 --- a/macros/ToolInitialization/INIT_SharedInfoEqual.bin +++ b/macros/ToolInitialization/INIT_SharedInfoEqual.bin diff --git a/macros/ToolInitialization/ManageNextConversion.bin b/macros/ToolInitialization/ManageNextConversion.bin Binary files differindex 03565bd..93114c6 100644 --- a/macros/ToolInitialization/ManageNextConversion.bin +++ b/macros/ToolInitialization/ManageNextConversion.bin diff --git a/macros/ToolInitialization/UpdateSCI2CInfo.bin b/macros/ToolInitialization/UpdateSCI2CInfo.bin Binary files differindex 2ee6b8d..142bfd7 100644 --- a/macros/ToolInitialization/UpdateSCI2CInfo.bin +++ b/macros/ToolInitialization/UpdateSCI2CInfo.bin diff --git a/macros/findDeps/getAllHeaders.bin b/macros/findDeps/getAllHeaders.bin Binary files differindex b0355de..3cbeb65 100644 --- a/macros/findDeps/getAllHeaders.bin +++ b/macros/findDeps/getAllHeaders.bin diff --git a/macros/findDeps/getAllInterfaces.bin b/macros/findDeps/getAllInterfaces.bin Binary files differindex 1a0fedc..c01712f 100644 --- a/macros/findDeps/getAllInterfaces.bin +++ b/macros/findDeps/getAllInterfaces.bin diff --git a/macros/findDeps/getAllSources.bin b/macros/findDeps/getAllSources.bin Binary files differindex a689472..bf26b3b 100644 --- a/macros/findDeps/getAllSources.bin +++ b/macros/findDeps/getAllSources.bin diff --git a/macros/findDeps/getArduinoFiles.bin b/macros/findDeps/getArduinoFiles.bin Binary files differnew file mode 100644 index 0000000..f63160e --- /dev/null +++ b/macros/findDeps/getArduinoFiles.bin diff --git a/src/c/operations/interfaces/int_OpLogEq.h b/src/c/operations/interfaces/int_OpLogEq.h index 446b11c..b693db6 100644 --- a/src/c/operations/interfaces/int_OpLogEq.h +++ b/src/c/operations/interfaces/int_OpLogEq.h @@ -31,6 +31,15 @@ #define c0s0OpLogEqs0(in1,in2) s0c0OpLogEqs0(in2,in1) #define z0d0OpLogEqd0(in1,in2) d0z0OpLogEqd0(in2,in1) +#define u80d0OpLogEqu80(in1,in2) (uint8) (in1 == (uint8)in2) +#define i80d0OpLogEqi80(in1,in2) (int8) (in1 == (int8)in2) +#define u160d0OpLogEqu160(in1,in2) (uint16) (in1 == (uint16)in2) +#define i160d0OpLogEqi160(in1,in2) (int16) (in1 == (int16)in2) + +#define d0u80OpLogEqu80(in1,in2) (uint8) ((uint8)in1 == in2) +#define d0i80OpLogEqi80(in1,in2) (int8) ((int8)in1 == in2) +#define d0u160OpLogEqu160(in1,in2) (uint16) ((uint16)in1 == in2) +#define d0i160OpLogEqi160(in1,in2) (int16) ((int16)in1 == in2) #define s2s0OpLogEqs2(in1,size,in2,out) {int i;\ diff --git a/src/c/scilab-arduino/default_files/Makefile b/src/c/scilab-arduino/default_files/Makefile index 7d74195..2b888f0 100644 --- a/src/c/scilab-arduino/default_files/Makefile +++ b/src/c/scilab-arduino/default_files/Makefile @@ -3,8 +3,8 @@ ARDUINO_DIR = /usr/share/arduino ARDMK_DIR = /usr/share/arduino AVR_TOOLS_DIR = /usr -BOARD_TAG = atmega328 +BOARD_TAG = uno USER_LIB_PATH = ../../ ARDUINO_LIBS = src/c includes interfaces ../Temp -ARDUINO_PORT = /dev/ttyUSB0 +ARDUINO_PORT = /dev/ttyACM0 include /usr/share/arduino/Arduino.mk diff --git a/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h b/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h index a3d1eab..fdc1728 100644 --- a/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h +++ b/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h @@ -23,6 +23,11 @@ extern "C" { #define d0d0d0cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ (uint8)in2,(uint8)in3) +//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) + + #ifdef __cplusplus } /* extern "C" */ #endif |