summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/includes
diff options
context:
space:
mode:
authorsiddhu89902016-02-01 11:29:45 +0530
committersiddhu89902016-02-01 11:29:45 +0530
commit58b8656a350fed1a1e59caa484e6d9967dd1bc4d (patch)
tree32564f5b0100d57a6ad1019b77a601ecfe678d92 /2.3-1/src/c/elementaryFunctions/includes
parent3425c4fedbdbc7e1a3440df7502d9af93f466b84 (diff)
parent7bc57b2061931e5b5843ac6616591b7cff9e9476 (diff)
downloadScilab2C-58b8656a350fed1a1e59caa484e6d9967dd1bc4d.tar.gz
Scilab2C-58b8656a350fed1a1e59caa484e6d9967dd1bc4d.tar.bz2
Scilab2C-58b8656a350fed1a1e59caa484e6d9967dd1bc4d.zip
Merged RPi and bit operators
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/includes')
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitand.h39
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitcmp.h38
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitget.h25
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitor.h38
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitset.h25
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitxor.h38
6 files changed, 203 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitand.h b/2.3-1/src/c/elementaryFunctions/includes/bitand.h
new file mode 100644
index 00000000..8d98d9be
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitand.h
@@ -0,0 +1,39 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITAND_H__
+#define __BITAND_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitand returns the logical AND operation
+ 12 = 00001100 (In Binary)
+ 25 = 00011001 (In Binary)
+
+Bit Operation of 12 and 25
+ 00001100
+& 00011001
+ ________
+ 00001000 = 8 (In decimal)
+*/
+
+EXTERN_ELEMFUNCT uint8 u8bitands(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitanda(uint8* in1,uint8* in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitands(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitanda(uint16* in1,uint16* in2,int size,uint16* out);
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITAND_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h b/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h
new file mode 100644
index 00000000..8176681e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h
@@ -0,0 +1,38 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITCMP_H__
+#define __BITCMP_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitcmp returns the complement
+35=00100011 (In Binary)
+
+Bitwise complement Operation of 35
+~ 00100011
+ ________
+ 11011100 = 220 (In decimal)
+*/
+
+EXTERN_ELEMFUNCT uint8 u8bitcmps(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitcmpa(uint8* in1,uint8 in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitcmps(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitcmpa(uint16* in1,uint16 in2,int size,uint16* out);
+
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITCMP_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitget.h b/2.3-1/src/c/elementaryFunctions/includes/bitget.h
new file mode 100644
index 00000000..0eaf57eb
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitget.h
@@ -0,0 +1,25 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITGET_H__
+#define __BITGET_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+
+
+EXTERN_ELEMFUNCT uint8 u8bitgets(uint8 value,int position);
+
+EXTERN_ELEMFUNCT uint16 u16bitgets(uint16 value,int position);
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITGET_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitor.h b/2.3-1/src/c/elementaryFunctions/includes/bitor.h
new file mode 100644
index 00000000..16a6a3d1
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitor.h
@@ -0,0 +1,38 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITOR_H__
+#define __BITOR_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitor returns the logical OR operation
+ 12 = 00001100 (In Binary)
+25 = 00011001 (In Binary)
+
+Bitwise OR Operation of 12 and 25
+ 00001100
+| 00011001
+ ________
+ 00011101 = 29 (In decimal) */
+
+EXTERN_ELEMFUNCT uint8 u8bitors(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitora(uint8* in1,uint8* in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitors(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitora(uint16* in1,uint16* in2,int size,uint16* out);
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITOR_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitset.h b/2.3-1/src/c/elementaryFunctions/includes/bitset.h
new file mode 100644
index 00000000..862a4c80
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitset.h
@@ -0,0 +1,25 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITSET_H__
+#define __BITSET_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+
+
+EXTERN_ELEMFUNCT uint8 u8bitsets(uint8 value,int position,int bit_value);
+
+EXTERN_ELEMFUNCT uint16 u16bitsets(uint16 value,int position,int bit_value);
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITSET_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitxor.h b/2.3-1/src/c/elementaryFunctions/includes/bitxor.h
new file mode 100644
index 00000000..4e276353
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitxor.h
@@ -0,0 +1,38 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITXOR_H__
+#define __BITXOR_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitxor returns the logical OR operation
+ 12 = 00001100 (In Binary)
+25 = 00011001 (In Binary)
+
+Bitwise XOR Operation of 12 and 25
+ 00001100
+^ 00011001
+ ________
+ 00010101 = 21 (In decimal) */
+
+EXTERN_ELEMFUNCT uint8 u8bitxors(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitxora(uint8* in1,uint8* in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitxors(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitxora(uint16* in1,uint16* in2,int size,uint16* out);
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITXOR_H__ */