summaryrefslogtreecommitdiff
path: root/2.3-1/src
diff options
context:
space:
mode:
authorsiddhu89902017-04-19 14:28:34 +0530
committersiddhu89902017-04-19 14:28:34 +0530
commit586db6343e7b472d8dc3e63a82f4c73f99cdcbd7 (patch)
treee74d643b27634303e772074fc61a717ff400ac0a /2.3-1/src
parent645c51daadc9a5c9374b0465ded05f84bca65183 (diff)
downloadScilab2C-586db6343e7b472d8dc3e63a82f4c73f99cdcbd7.tar.gz
Scilab2C-586db6343e7b472d8dc3e63a82f4c73f99cdcbd7.tar.bz2
Scilab2C-586db6343e7b472d8dc3e63a82f4c73f99cdcbd7.zip
Merged Ashish's work
Diffstat (limited to '2.3-1/src')
-rw-r--r--2.3-1/src/c/elementaryFunctions/acosd/cacoss.c147
-rw-r--r--2.3-1/src/c/elementaryFunctions/acosd/dacosda.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acosd/dacosds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acosd/sacosda.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acosd/sacosds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/cacota.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/cacots.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/dacota.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/dacots.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/sacota.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/sacots.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/zacota.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acot/zacots.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/acotd/dacotda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/acotd/dacotds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acotd/sacotda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/acotd/sacotds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/cacotha.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/cacoths.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/dacotha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/dacoths.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/sacotha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/sacoths.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/zacotha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/zacoths.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/cacsca.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/cacscs.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/dacsca.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/dacscs.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/sacsca.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/sacscs.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/zacsca.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsc/zacscs.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/acscd/dacscda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acscd/dacscds.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/acscd/sacscda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acscd/sacscds.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/cacscha.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/cacschs.c30
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/dacscha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/dacschs.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/sacscha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/sacschs.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/zacscha.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acsch/zacschs.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/asec/daseca.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asec/dasecs.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/asec/saseca.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asec/sasecs.c27
-rw-r--r--2.3-1/src/c/elementaryFunctions/asecd/dasecda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asecd/dasecds.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/asecd/sasecda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asecd/sasecds.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/asech/dasecha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asech/dasechs.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/asech/sasecha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asech/sasechs.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/asind/dasinda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asind/dasinds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/asind/sasinda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/asind/sasinds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/atan/datans.c3
-rw-r--r--2.3-1/src/c/elementaryFunctions/atand/datanda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/atand/datands.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/atand/satanda.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/atand/satands.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acosd.h33
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acot.h43
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acotd.h37
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acoth.h44
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acsc.h44
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acscd.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/acsch.h32
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/asec.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/asecd.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/asech.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/asind.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/atand.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acosd.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acot.h42
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acotd.h33
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acoth.h43
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acsc.h42
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acscd.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_acsch.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_asec.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_asecd.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_asech.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_asind.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_atand.h34
-rw-r--r--2.3-1/src/c/elementaryFunctions/linspace/dlinspacea.c~39
-rw-r--r--2.3-1/src/c/elementaryFunctions/linspace/dlinspaces.c~25
-rw-r--r--2.3-1/src/c/elementaryFunctions/linspace/u8linspacea.c~39
-rw-r--r--2.3-1/src/c/elementaryFunctions/linspace/u8linspaces.c~25
-rw-r--r--2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c22
-rw-r--r--2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c54
-rw-r--r--2.3-1/src/c/hardware/avr/default_files/Makefile387
-rw-r--r--2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c29
-rw-r--r--2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c12
-rw-r--r--2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalPortSetups.c81
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h4
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h17
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralPWM.h13
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralTimer.h17
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRPeripheralUART.h59
-rw-r--r--2.3-1/src/c/hardware/avr/includes/AVRUtil.h14
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h14
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h19
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralPWM.h27
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralTimer.h18
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralUART.h57
-rw-r--r--2.3-1/src/c/hardware/avr/interfaces/int_AVRUtil.h19
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0SetDutys.c24
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0Setups.c50
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1SetDutys.c31
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1Setups.c69
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2SetDutys.c22
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2Setups.c47
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetDutys.c39
-rw-r--r--2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetups.c60
-rw-r--r--2.3-1/src/c/hardware/avr/timer/u16AVRGetTimerValues.c51
-rw-r--r--2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c44
-rw-r--r--2.3-1/src/c/hardware/avr/timer/u8AVRTimerSetups.c138
-rw-r--r--2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmits.c88
-rw-r--r--2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmitu8.c21
-rw-r--r--2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmita.c26
-rw-r--r--2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmits.c31
-rw-r--r--2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmitu8.c24
-rw-r--r--2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmita.c27
-rw-r--r--2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmits.c73
-rw-r--r--2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmitu8.c31
-rw-r--r--2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmita.c25
-rw-r--r--2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmits.c26
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmita.c28
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmits.c87
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmitu8.c38
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u8AVRUARTReceiveCharu8.c20
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u8AVRUARTSetups.c215
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmita.c26
-rw-r--r--2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmits.c60
-rw-r--r--2.3-1/src/c/hardware/avr/util/u16AVRSleeps.c15
141 files changed, 4314 insertions, 429 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/acosd/cacoss.c b/2.3-1/src/c/elementaryFunctions/acosd/cacoss.c
new file mode 100644
index 00000000..97420313
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acosd/cacoss.c
@@ -0,0 +1,147 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET
+ * Copyright (C) Bruno Pincon
+ *
+ * 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
+ *
+ */
+
+/*
+ * This fonction is a translation of fortran wacos write by Bruno Pincon <Bruno.Pincon@iecn.u-nancy.fr>
+ * REFERENCE
+ * This is a Fortran-77 translation of an algorithm by
+ * T.E. Hull, T. F. Fairgrieve and P.T.P. Tang which
+ * appears in their article :
+ * "Implementing the Complex Arcsine and Arccosine
+ * Functions Using Exception Handling", ACM, TOMS,
+ * Vol 23, No. 3, Sept 1997, p. 299-335
+ */
+
+#include "acos.h"
+#include "atan.h"
+#include "log.h"
+#include "log1p.h"
+#include "sqrt.h"
+#include "abs.h"
+#include "lapack.h"
+#include "min.h"
+#include "max.h"
+
+#define localSign(x) (x>0 ? 1.0f : -1.0f)
+
+floatComplex cacoss(floatComplex z) {
+ static float sfltPi = 3.1415926535897932384626433f;
+ static float sfltPi_2 = 1.5707963267948966192313216f;
+ static float sfltLn2 = 0.6931471805599453094172321f;
+ static float sfltAcross = 1.5f;
+ static float sfltBcross = 0.6417f;
+
+ float fltLsup = ssqrts((float) getOverflowThreshold())/8.0f;
+ float fltLinf = 4.0f * ssqrts((float) getUnderflowThreshold());
+ float fltEpsm = ssqrts((float) getRelativeMachinePrecision());
+
+ float fltAbsReal = sabss(creals(z));
+ float fltAbsImg = sabss(cimags(z));
+ float fltSignReal = localSign(creals(z));
+ float fltSignImg = localSign(cimags(z));
+
+ float fltR = 0, fltS = 0, fltA = 0, fltB = 0;
+
+ float fltTemp = 0;
+
+ float _pfltReal = 0;
+ float _pfltImg = 0;
+
+ if( min(fltAbsReal, fltAbsImg) > fltLinf && max(fltAbsReal, fltAbsImg) <= fltLsup)
+ {/* we are in the safe region */
+ fltR = ssqrts( (fltAbsReal + 1 )*(fltAbsReal + 1 ) + fltAbsImg*fltAbsImg);
+ fltS = ssqrts( (fltAbsReal - 1 )*(fltAbsReal - 1 ) + fltAbsImg*fltAbsImg);
+ fltA = 0.5f * ( fltR + fltS );
+ fltB = fltAbsReal / fltA;
+
+
+ /* compute the real part */
+ if(fltB <= sfltBcross)
+ _pfltReal = sacoss(fltB);
+ else if( fltAbsReal <= 1)
+ _pfltReal = satans(ssqrts(0.5f * (fltA + fltAbsReal) * (fltAbsImg*fltAbsImg / (fltR + (fltAbsReal + 1)) + (fltS + (1 - fltAbsReal)))) / fltAbsReal);
+ else
+ _pfltReal = satans((fltAbsImg * ssqrts(0.5f * ((fltA + fltAbsReal) / (fltR + (fltAbsReal + 1)) + (fltA + fltAbsReal) / (fltS + (fltAbsReal - 1))))) / fltAbsReal);
+
+ /* compute the imaginary part */
+ if(fltA <= sfltAcross)
+ {
+ float fltImg1 = 0;
+
+ if(fltAbsReal < 1)
+ /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(y**2)/(S+(1.d0-x))) */
+ fltImg1 = 0.5f * (fltAbsImg*fltAbsImg / (fltR + (fltAbsReal + 1)) + fltAbsImg*fltAbsImg / (fltS + (1 - fltAbsReal)));
+ else
+ /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(S+(x-1.d0))) */
+ fltImg1 = 0.5f * (fltAbsImg*fltAbsImg / (fltR + (fltAbsReal + 1)) + (fltS + (fltAbsReal - 1)));
+ /* ai = logp1(Am1 + sqrt(Am1*(A+1.d0))) */
+ fltTemp = fltImg1 + ssqrts(fltImg1 *( fltA + 1));
+ _pfltImg = slog1ps(fltTemp);
+ }
+ else
+ /* ai = log(A + sqrt(A**2 - 1.d0)) */
+ _pfltImg = slogs(fltA + ssqrts(fltA*fltA - 1));
+ }
+ else
+ {/* evaluation in the special regions ... */
+ if(fltAbsImg <= fltEpsm * sabss(fltAbsReal - 1))
+ {
+ if(fltAbsReal < 1)
+ {
+ _pfltReal = sacoss(fltAbsReal);
+ _pfltImg = fltAbsImg / ssqrts((1 + fltAbsReal) * (1 - fltAbsReal));
+ }
+ else
+ {
+ _pfltReal = 0;
+ if(fltAbsReal <= fltLsup)
+ {
+ fltTemp = (fltAbsReal - 1) + ssqrts((fltAbsReal - 1) * (fltAbsReal + 1));
+ _pfltImg = slog1ps(fltTemp);
+ }
+ else
+ _pfltImg = sfltLn2 + slogs(fltAbsReal);
+ }
+ }
+ else if(fltAbsImg < fltLinf)
+ {
+ _pfltReal = ssqrts(fltAbsImg);
+ _pfltImg = _pfltReal;
+ }
+ else if((fltEpsm * fltAbsImg - 1 >= fltAbsReal))
+ {
+ _pfltReal = sfltPi_2;
+ _pfltImg = sfltLn2 + slogs(fltAbsImg);
+ }
+ else if(fltAbsReal > 1)
+ {
+ _pfltReal = satans(fltAbsImg / fltAbsReal);
+ fltTemp = (fltAbsReal / fltAbsImg)*(fltAbsReal / fltAbsImg);
+ _pfltImg = sfltLn2 + slogs(fltAbsImg) + 0.5f * slog1ps(fltTemp);
+ }
+ else
+ {
+ float fltTemp2 = ssqrts(1 + fltAbsImg*fltAbsImg);
+ _pfltReal = sfltPi_2;
+ fltTemp = 2 * fltAbsImg * (fltAbsImg + fltTemp2);
+ _pfltImg = 0.5f * slog1ps(fltTemp);
+ }
+ }
+ if(fltSignReal < 0)
+ _pfltReal = sfltPi - _pfltReal;
+
+ if(fltAbsImg != 0 || fltSignReal < 0)
+ _pfltImg = - fltSignImg * _pfltImg;
+
+ return FloatComplex(_pfltReal, _pfltImg);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acosd/dacosda.c b/2.3-1/src/c/elementaryFunctions/acosd/dacosda.c
new file mode 100644
index 00000000..2e95e9fc
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acosd/dacosda.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acosd.h"
+
+void dacosda(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacosds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acosd/dacosds.c b/2.3-1/src/c/elementaryFunctions/acosd/dacosds.c
new file mode 100644
index 00000000..8f59dab6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acosd/dacosds.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acosd.h"
+
+double dacosds(double x)
+{
+ return ((acos(x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acosd/sacosda.c b/2.3-1/src/c/elementaryFunctions/acosd/sacosda.c
new file mode 100644
index 00000000..440d9dc3
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acosd/sacosda.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acosd.h"
+
+void sacosda(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacosds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acosd/sacosds.c b/2.3-1/src/c/elementaryFunctions/acosd/sacosds.c
new file mode 100644
index 00000000..c166ff0e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acosd/sacosds.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acosd.h"
+
+double sacosds(float x)
+{
+ return ((acos(x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/cacota.c b/2.3-1/src/c/elementaryFunctions/acot/cacota.c
new file mode 100644
index 00000000..64e82b21
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/cacota.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acot.h"
+#include "floatComplex.h"
+
+void cacota(floatComplex* x, int size, floatComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = cacots(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/cacots.c b/2.3-1/src/c/elementaryFunctions/acot/cacots.c
new file mode 100644
index 00000000..f4c6236e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/cacots.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acot.h"
+#include "division.h"
+#include "floatComplex.h"
+#include "atan.h"
+
+floatComplex cacots(floatComplex x)
+{
+ floatComplex xinv;
+ xinv = crdivs(FloatComplex(1,0),x);
+ return catans(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/dacota.c b/2.3-1/src/c/elementaryFunctions/acot/dacota.c
new file mode 100644
index 00000000..794d0817
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/dacota.c
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acot.h"
+
+void dacota(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = dacots(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/dacots.c b/2.3-1/src/c/elementaryFunctions/acot/dacots.c
new file mode 100644
index 00000000..42ce7b57
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/dacots.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acot.h"
+
+double dacots(double x)
+{
+ return ((3.14159265359/2)-atan(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/sacota.c b/2.3-1/src/c/elementaryFunctions/acot/sacota.c
new file mode 100644
index 00000000..b99a7739
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/sacota.c
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acot.h"
+
+void sacota(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = sacots(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/sacots.c b/2.3-1/src/c/elementaryFunctions/acot/sacots.c
new file mode 100644
index 00000000..db6dca2f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/sacots.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acot.h"
+
+float sacots(float x)
+{
+ return ((3.14159265359/2)-atanf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/zacota.c b/2.3-1/src/c/elementaryFunctions/acot/zacota.c
new file mode 100644
index 00000000..d08ebddd
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/zacota.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acot.h"
+#include "doubleComplex.h"
+
+void zacota(doubleComplex* x, int size, doubleComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = zacots(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acot/zacots.c b/2.3-1/src/c/elementaryFunctions/acot/zacots.c
new file mode 100644
index 00000000..3bf99b2c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acot/zacots.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acot.h"
+#include "division.h"
+#include "doubleComplex.h"
+#include "atan.h"
+
+doubleComplex zacots(doubleComplex x)
+{
+ doubleComplex xinv;
+ xinv = zrdivs(DoubleComplex(1,0),x);
+ return zatans(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acotd/dacotda.c b/2.3-1/src/c/elementaryFunctions/acotd/dacotda.c
new file mode 100644
index 00000000..a2b64856
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acotd/dacotda.c
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acotd.h"
+
+void dacotda(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = dacotds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acotd/dacotds.c b/2.3-1/src/c/elementaryFunctions/acotd/dacotds.c
new file mode 100644
index 00000000..f149ac23
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acotd/dacotds.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acotd.h"
+
+double dacotds(double x)
+{
+ return ((((3.14159265359/2)-atan(x))*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acotd/sacotda.c b/2.3-1/src/c/elementaryFunctions/acotd/sacotda.c
new file mode 100644
index 00000000..39503044
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acotd/sacotda.c
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acotd.h"
+
+void sacotda(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = sacotds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acotd/sacotds.c b/2.3-1/src/c/elementaryFunctions/acotd/sacotds.c
new file mode 100644
index 00000000..25797532
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acotd/sacotds.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acotd.h"
+
+float sacotds(float x)
+{
+ return ((((3.14159265359/2)-atanf(x))*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/cacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/cacotha.c
new file mode 100644
index 00000000..f4e72dc6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/cacotha.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+#include "floatComplex.h"
+
+void cacotha(floatComplex* x, int size, floatComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = cacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/cacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/cacoths.c
new file mode 100644
index 00000000..658c227a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/cacoths.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acoth.h"
+#include "division.h"
+#include "floatComplex.h"
+#include "atanh.h"
+
+floatComplex cacoths(floatComplex x)
+{
+ floatComplex xinv;
+ xinv = crdivs(FloatComplex(1,0),x);
+ return catanhs(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/dacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/dacotha.c
new file mode 100644
index 00000000..b97b9039
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/dacotha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+
+void dacotha(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/dacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/dacoths.c
new file mode 100644
index 00000000..a2dd8750
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/dacoths.c
@@ -0,0 +1,19 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+#include "log.h"
+
+
+double dacoths(double x)
+{
+ return (log((1+x)/(x-1))/2);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/sacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/sacotha.c
new file mode 100644
index 00000000..383f1882
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/sacotha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+
+void sacotha(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/sacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/sacoths.c
new file mode 100644
index 00000000..12f5381d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/sacoths.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+#include "log.h"
+
+float sacoths(float x)
+{
+ return (log((1+x)/(x-1))/2);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/zacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/zacotha.c
new file mode 100644
index 00000000..3eb335ea
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/zacotha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+#include "doubleComplex.h"
+
+void zacotha(doubleComplex* x, int size, doubleComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = zacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/zacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/zacoths.c
new file mode 100644
index 00000000..bbb387b0
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/zacoths.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acoth.h"
+#include "division.h"
+#include "doubleComplex.h"
+#include "atanh.h"
+
+doubleComplex zacoths(doubleComplex x)
+{
+ doubleComplex xinv;
+ xinv = zrdivs(DoubleComplex(1,0),x);
+ return zatanhs(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/cacsca.c b/2.3-1/src/c/elementaryFunctions/acsc/cacsca.c
new file mode 100644
index 00000000..0512a20f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/cacsca.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+#include "floatComplex.h"
+
+void cacsca(floatComplex* x, int size, floatComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = cacscs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/cacscs.c b/2.3-1/src/c/elementaryFunctions/acsc/cacscs.c
new file mode 100644
index 00000000..9eea94e5
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/cacscs.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+#include "floatComplex.h"
+#include "asin.h"
+#include "division.h"
+
+floatComplex cacscs(floatComplex x)
+{
+ floatComplex xinv;
+ xinv = crdivs(FloatComplex(1,0),x);
+ return casins(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/dacsca.c b/2.3-1/src/c/elementaryFunctions/acsc/dacsca.c
new file mode 100644
index 00000000..3f00d216
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/dacsca.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+
+void dacsca(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacscs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/dacscs.c b/2.3-1/src/c/elementaryFunctions/acsc/dacscs.c
new file mode 100644
index 00000000..4b5ac25d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/dacscs.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+
+double dacscs(double x)
+{
+ return asin(1/x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/sacsca.c b/2.3-1/src/c/elementaryFunctions/acsc/sacsca.c
new file mode 100644
index 00000000..79e6bf95
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/sacsca.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+
+void sacsca(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacscs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/sacscs.c b/2.3-1/src/c/elementaryFunctions/acsc/sacscs.c
new file mode 100644
index 00000000..e91fa398
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/sacscs.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+
+float sacscs(float x)
+{
+ return asin(1/x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/zacsca.c b/2.3-1/src/c/elementaryFunctions/acsc/zacsca.c
new file mode 100644
index 00000000..164406f6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/zacsca.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+#include "doubleComplex.h"
+
+void zacsca(doubleComplex* x, int size, doubleComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = zacscs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsc/zacscs.c b/2.3-1/src/c/elementaryFunctions/acsc/zacscs.c
new file mode 100644
index 00000000..91bb6c8c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsc/zacscs.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acsc.h"
+#include "doubleComplex.h"
+#include "division.h"
+#include "asin.h"
+
+doubleComplex zacscs(doubleComplex x)
+{
+ doubleComplex xinv;
+ xinv = zrdivs(DoubleComplex(1,0),x);
+ return zasins(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acscd/dacscda.c b/2.3-1/src/c/elementaryFunctions/acscd/dacscda.c
new file mode 100644
index 00000000..84eeaed2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acscd/dacscda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acscd.h"
+
+void dacscda(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacscds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acscd/dacscds.c b/2.3-1/src/c/elementaryFunctions/acscd/dacscds.c
new file mode 100644
index 00000000..27512ada
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acscd/dacscds.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acscd.h"
+
+double dacscds(double x)
+{
+ return ((asin(1/x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acscd/sacscda.c b/2.3-1/src/c/elementaryFunctions/acscd/sacscda.c
new file mode 100644
index 00000000..a5d130cf
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acscd/sacscda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acscd.h"
+
+void sacscda(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacscds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acscd/sacscds.c b/2.3-1/src/c/elementaryFunctions/acscd/sacscds.c
new file mode 100644
index 00000000..1c820c2a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acscd/sacscds.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acscd.h"
+
+float sacscds(float x)
+{
+ return ((asin(1/x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/cacscha.c b/2.3-1/src/c/elementaryFunctions/acsch/cacscha.c
new file mode 100644
index 00000000..0512a20f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/cacscha.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+#include "floatComplex.h"
+
+void cacsca(floatComplex* x, int size, floatComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = cacscs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/cacschs.c b/2.3-1/src/c/elementaryFunctions/acsch/cacschs.c
new file mode 100644
index 00000000..a250b9dc
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/cacschs.c
@@ -0,0 +1,30 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsch.h"
+#include "floatComplex.h"
+#include "asin.h"
+#include "division.h"
+
+floatComplex cacschs(floatComplex x)
+{
+ floatComplex xinv;
+ floatComplex temp;
+ xinv = crdivs(FloatComplex(1,0),x);
+ temp = sqrt(1+cmuls(xinv*xinv))
+
+}
+
+
+
+
+
+log(sqrt(1+(1/(x*x)))+(1/x));
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/dacscha.c b/2.3-1/src/c/elementaryFunctions/acsch/dacscha.c
new file mode 100644
index 00000000..e7177105
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/dacscha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsch.h"
+
+void dacscha(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacschs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/dacschs.c b/2.3-1/src/c/elementaryFunctions/acsch/dacschs.c
new file mode 100644
index 00000000..b0a32291
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/dacschs.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsch.h"
+
+double dacschs(double x)
+{
+ return log(sqrt(1+(1/(x*x)))+(1/x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/sacscha.c b/2.3-1/src/c/elementaryFunctions/acsch/sacscha.c
new file mode 100644
index 00000000..c2321c6d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/sacscha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsch.h"
+
+void sacscha(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacschs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/sacschs.c b/2.3-1/src/c/elementaryFunctions/acsch/sacschs.c
new file mode 100644
index 00000000..031773b9
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/sacschs.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsch.h"
+
+double sacschs(float x)
+{
+ return log(sqrt(1+(1/(x*x)))+(1/x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/zacscha.c b/2.3-1/src/c/elementaryFunctions/acsch/zacscha.c
new file mode 100644
index 00000000..164406f6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/zacscha.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+#include "doubleComplex.h"
+
+void zacsca(doubleComplex* x, int size, doubleComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = zacscs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acsch/zacschs.c b/2.3-1/src/c/elementaryFunctions/acsch/zacschs.c
new file mode 100644
index 00000000..6e33e25b
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acsch/zacschs.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "acsc.h"
+#include "doubleComplex.h"
+#include "division.h"
+#include "asin.h"
+
+doubleComplex zacscs(doubleComplex x)
+{
+ doubleComplex xinv;
+ xinv = zrdivs(DoubleComplex(1,0),x);
+ return zasins(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asec/daseca.c b/2.3-1/src/c/elementaryFunctions/asec/daseca.c
new file mode 100644
index 00000000..2cf1dcd8
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asec/daseca.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asec.h"
+
+void daseca(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dasecs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asec/dasecs.c b/2.3-1/src/c/elementaryFunctions/asec/dasecs.c
new file mode 100644
index 00000000..4f2f766e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asec/dasecs.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asec.h"
+
+double dasecs(double x)
+{
+ return acos(1/x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asec/saseca.c b/2.3-1/src/c/elementaryFunctions/asec/saseca.c
new file mode 100644
index 00000000..3b0afd84
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asec/saseca.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asec.h"
+
+void saseca(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sasecs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asec/sasecs.c b/2.3-1/src/c/elementaryFunctions/asec/sasecs.c
new file mode 100644
index 00000000..5db46a61
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asec/sasecs.c
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asec.h"
+
+double sasecs(float x)
+{
+ return acos(1/x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asecd/dasecda.c b/2.3-1/src/c/elementaryFunctions/asecd/dasecda.c
new file mode 100644
index 00000000..e692762c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asecd/dasecda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asecd.h"
+
+void dasecda(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dasecds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asecd/dasecds.c b/2.3-1/src/c/elementaryFunctions/asecd/dasecds.c
new file mode 100644
index 00000000..dead3189
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asecd/dasecds.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asecd.h"
+
+double dasecds(double x)
+{
+ return ((acos(1/x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asecd/sasecda.c b/2.3-1/src/c/elementaryFunctions/asecd/sasecda.c
new file mode 100644
index 00000000..5c9a42fd
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asecd/sasecda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asecd.h"
+
+void sasecda(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sasecds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asecd/sasecds.c b/2.3-1/src/c/elementaryFunctions/asecd/sasecds.c
new file mode 100644
index 00000000..2e265178
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asecd/sasecds.c
@@ -0,0 +1,17 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asecd.h"
+
+double sasecds(float x)
+{
+ return ((acos(1/x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asech/dasecha.c b/2.3-1/src/c/elementaryFunctions/asech/dasecha.c
new file mode 100644
index 00000000..7309e3f2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asech/dasecha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asech.h"
+
+void dasecha(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dasechs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asech/dasechs.c b/2.3-1/src/c/elementaryFunctions/asech/dasechs.c
new file mode 100644
index 00000000..ad5756ae
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asech/dasechs.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asech.h"
+#include "log.h"
+
+double dasechs(double x)
+{
+ return log(sqrt((1/x)+1)*sqrt((1/x)-1)+(1/x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asech/sasecha.c b/2.3-1/src/c/elementaryFunctions/asech/sasecha.c
new file mode 100644
index 00000000..f28eace6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asech/sasecha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asech.h"
+
+void sasecha(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sasechs(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asech/sasechs.c b/2.3-1/src/c/elementaryFunctions/asech/sasechs.c
new file mode 100644
index 00000000..b1a1cab2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asech/sasechs.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#include <math.h>
+#include "asech.h"
+#include "log.h"
+
+double sasechs(float x)
+{
+ return log(sqrt((1/x)+1)*sqrt((1/x)-1)+(1/x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asind/dasinda.c b/2.3-1/src/c/elementaryFunctions/asind/dasinda.c
new file mode 100644
index 00000000..4c7d9af7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asind/dasinda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "asind.h"
+
+void dasinda(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dasinds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asind/dasinds.c b/2.3-1/src/c/elementaryFunctions/asind/dasinds.c
new file mode 100644
index 00000000..bc028a15
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asind/dasinds.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "asind.h"
+
+double dasinds(double x)
+{
+ return ((asin(x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asind/sasinda.c b/2.3-1/src/c/elementaryFunctions/asind/sasinda.c
new file mode 100644
index 00000000..100d09cb
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asind/sasinda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "asind.h"
+
+void sasinda(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sasinds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/asind/sasinds.c b/2.3-1/src/c/elementaryFunctions/asind/sasinds.c
new file mode 100644
index 00000000..1bbb3624
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/asind/sasinds.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "asind.h"
+
+double sasinds(float x)
+{
+ return ((asin(x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/atan/datans.c b/2.3-1/src/c/elementaryFunctions/atan/datans.c
index a16df82d..11785c04 100644
--- a/2.3-1/src/c/elementaryFunctions/atan/datans.c
+++ b/2.3-1/src/c/elementaryFunctions/atan/datans.c
@@ -13,6 +13,7 @@
#include <math.h>
#include "atan.h"
-double datans(double x) {
+double datans(double x)
+{
return (atan(x));
}
diff --git a/2.3-1/src/c/elementaryFunctions/atand/datanda.c b/2.3-1/src/c/elementaryFunctions/atand/datanda.c
new file mode 100644
index 00000000..5bf8cd9c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/atand/datanda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "atand.h"
+
+void datanda(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = datands(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/atand/datands.c b/2.3-1/src/c/elementaryFunctions/atand/datands.c
new file mode 100644
index 00000000..8346ebe9
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/atand/datands.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "atand.h"
+
+double datands(double x)
+{
+ return ((atan(x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/atand/satanda.c b/2.3-1/src/c/elementaryFunctions/atand/satanda.c
new file mode 100644
index 00000000..1669d69b
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/atand/satanda.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "atand.h"
+
+void satanda(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = satands(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/atand/satands.c b/2.3-1/src/c/elementaryFunctions/atand/satands.c
new file mode 100644
index 00000000..49ee6286
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/atand/satands.c
@@ -0,0 +1,18 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "atand.h"
+
+double satands(float x)
+{
+ return ((atan(x)*180)/3.14159265359);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acosd.h b/2.3-1/src/c/elementaryFunctions/includes/acosd.h
new file mode 100644
index 00000000..96dae80a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acosd.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ACOSD_H__
+#define __ACOSD_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacosds(double x);
+
+void dacosda(double* x, int size, double* y);
+
+double sacosds(float x);
+
+void sacosda(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOSD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acot.h b/2.3-1/src/c/elementaryFunctions/includes/acot.h
new file mode 100644
index 00000000..430be12d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acot.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ACOT_H__
+#define __ACOT_H__
+#include "types.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacots(double x);
+
+void dacota(double* x, int size, double* y);
+
+float sacots(float x);
+
+void sacota(float* x, int size, float* y);
+
+floatComplex cacots(floatComplex x);
+
+void cacota(floatComplex* x, int size, floatComplex* y);
+
+doubleComplex zacots(doubleComplex x);
+
+void zacota(doubleComplex* x, int size, doubleComplex* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOT_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acotd.h b/2.3-1/src/c/elementaryFunctions/includes/acotd.h
new file mode 100644
index 00000000..3be05ccf
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acotd.h
@@ -0,0 +1,37 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ACOTD_H__
+#define __ACOTD_H__
+#include "types.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacotds(double x);
+
+void dacotda(double* x, int size, double* y);
+
+float sacotds(float x);
+
+void sacotda(float* x, int size, float* y);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOTD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acoth.h b/2.3-1/src/c/elementaryFunctions/includes/acoth.h
new file mode 100644
index 00000000..975182fe
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acoth.h
@@ -0,0 +1,44 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ACOTH_H__
+#define __ACOTH_H__
+#include "types.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacoths(double x);
+
+void dacotha(double* x, int size, double* y);
+
+float sacoths(float x);
+
+void sacotha(float* x, int size, float* y);
+
+floatComplex cacoths(floatComplex x);
+
+void cacotha(floatComplex* x, int size, floatComplex* y);
+
+doubleComplex zacoths(doubleComplex x);
+
+void zacotha(doubleComplex* x, int size, doubleComplex* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOTH_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acsc.h b/2.3-1/src/c/elementaryFunctions/includes/acsc.h
new file mode 100644
index 00000000..be6455a4
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acsc.h
@@ -0,0 +1,44 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __ACSC_H__
+#define __ACSC_H__
+#include "types.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacscs(double x);
+
+void dacsca(double* x, int size, double* y);
+
+float sacscs(float x);
+
+void sacsca(float* x, int size, float* y);
+
+floatComplex cacscs(floatComplex x);
+
+void cacsca(floatComplex* x, int size, floatComplex* y);
+
+doubleComplex zacscs(doubleComplex x);
+
+void zacsca(doubleComplex* x, int size, doubleComplex* y);
+
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACSC_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acscd.h b/2.3-1/src/c/elementaryFunctions/includes/acscd.h
new file mode 100644
index 00000000..3c5bb18d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acscd.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __ACSCD_H__
+#define __ACSCD_H__
+#include "types.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacscds(double x);
+
+void dacscda(double* x, int size, double* y);
+
+float sacscds(float x);
+
+void sacscda(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACSCD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/acsch.h b/2.3-1/src/c/elementaryFunctions/includes/acsch.h
new file mode 100644
index 00000000..ba2b1e1d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/acsch.h
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __ACSCH_H__
+#define __ACSCH_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dacschs(double x);
+
+void dacscha(double* x, int size, double* y);
+
+double sacschs(float x);
+
+void sacscha(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACSCH_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/asec.h b/2.3-1/src/c/elementaryFunctions/includes/asec.h
new file mode 100644
index 00000000..8d1a65d1
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/asec.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ASEC_H__
+#define __ASEC_H__
+#include "types.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dasecs(double x);
+
+void daseca(double* x, int size, double* y);
+
+double sasecs(float x);
+
+void saseca(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASEC_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/asecd.h b/2.3-1/src/c/elementaryFunctions/includes/asecd.h
new file mode 100644
index 00000000..104677bd
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/asecd.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ASECD_H__
+#define __ASECD_H__
+#include "types.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dasecds(double x);
+
+void dasecda(double* x, int size, double* y);
+
+double sasecds(float x);
+
+void sasecda(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASECD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/asech.h b/2.3-1/src/c/elementaryFunctions/includes/asech.h
new file mode 100644
index 00000000..5e6c5e9c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/asech.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ASECH_H__
+#define __ASECH_H__
+#include "types.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dasechs(double x);
+
+void dasecha(double* x, int size, double* y);
+
+double sasechs(float x);
+
+void sasecha(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASECH_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/asind.h b/2.3-1/src/c/elementaryFunctions/includes/asind.h
new file mode 100644
index 00000000..8f7d7102
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/asind.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ASIND_H__
+#define __ASIND_H__
+#include "types.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dasinds(double x);
+
+void dasinda(double* x, int size, double* y);
+
+double sasinds(float x);
+
+void sasinda(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASIND_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/includes/atand.h b/2.3-1/src/c/elementaryFunctions/includes/atand.h
new file mode 100644
index 00000000..ed10f09f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/atand.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __ATAND_H__
+#define __ATAND_H__
+#include "types.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double datands(double x);
+
+void datanda(double* x, int size, double* y);
+
+double satands(float x);
+
+void satanda(float* x, int size, float* y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ATAND_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acosd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acosd.h
new file mode 100644
index 00000000..ee188c98
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acosd.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ACOSD_H__
+#define __INT_ACOSD_H__
+
+#include "acosd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acosdd0(in1) dacosds(in1);
+
+#define d2acosdd2(in1,in2,in3) dacosda(in1,in2[0]*in2[1],in3);
+
+#define s0acosds0(in1) sacosds(in1);
+
+#define s2acosds2(in1,in2,in3) sacosda(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOSD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acot.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acot.h
new file mode 100644
index 00000000..371e64b5
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acot.h
@@ -0,0 +1,42 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ACOT_H__
+#define __INT_ACOT_H__
+
+#include "acot.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acotd0(in1) dacots(in1);
+
+#define d2acotd2(in1,in2,in3) dacota(in1,in2[0]*in2[1],in3);
+
+#define s0acots0(in1) sacots(in1);
+
+#define s2acots2(in1,in2,in3) sacota(in1,in2[0]*in2[1],in3);
+
+#define c0acotd0(in1) cacots(in1);
+
+#define c2acotc2(in1,in2,in3) cacota(in1,in2[0]*in2[1],in3);
+
+#define z0acotz0(in1) zacots(in1);
+
+#define z2acotz2(in1,in2,in3) zacota(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOT_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acotd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acotd.h
new file mode 100644
index 00000000..22367bee
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acotd.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ACOTD_H__
+#define __INT_ACOTD_H__
+
+#include "acotd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acotdd0(in1) dacotds(in1);
+
+#define d2acotdd2(in1,in2,in3) dacotda(in1,in2[0]*in2[1],in3);
+
+#define s0acotds0(in1) sacotds(in1);
+
+#define s2acotds2(in1,in2,in3) sacotda(in1,in2[0]*in2[1],in3);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOTD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acoth.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acoth.h
new file mode 100644
index 00000000..8ec51a77
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acoth.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#ifndef __INT_ACOTH_H__
+#define __INT_ACOTH_H__
+
+#include "acoth.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acothd0(in1) dacoths(in1);
+
+#define d2acothd2(in1,in2,in3) dacotha(in1,in2[0]*in2[1],in3);
+
+#define s0acoths0(in1) sacoths(in1);
+
+#define s2acoths2(in1,in2,in3) sacotha(in1,in2[0]*in2[1],in3);
+
+#define c0acothc0(in1) cacoths(in1);
+
+#define c2acothc2(in1,in2,in3) cacotha(in1,in2[0]*in2[1],in3);
+
+#define z0acothz0(in1) zacoths(in1);
+
+#define z2acothz2(in1,in2,in3) zacotha(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACOTH_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acsc.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acsc.h
new file mode 100644
index 00000000..e16f7c99
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acsc.h
@@ -0,0 +1,42 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ACSC_H__
+#define __INT_ACSC_H__
+
+#include "acsc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acscd0(in1) dacscs(in1);
+
+#define d2acscd2(in1,in2,in3) dacsca(in1,in2[0]*in2[1],in3);
+
+#define s0acscs0(in1) sacscs(in1);
+
+#define s2acscs2(in1,in2,in3) sacsca(in1,in2[0]*in2[1],in3);
+
+#define c0acscc0(in1) cacscs(in1);
+
+#define c2acscc2(in1,in2,in3) cacsca(in1,in2[0]*in2[1],in3);
+
+#define z0acscz0(in1) zacscs(in1);
+
+#define z2acscz2(in1,in2,in3) zacsca(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACSC_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acscd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acscd.h
new file mode 100644
index 00000000..fa13acb8
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acscd.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ACSCD_H__
+#define __INT_ACSCD_H__
+
+#include "acscd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acscdd0(in1) dacscds(in1);
+
+#define d2acscdd2(in1,in2,in3) dacscda(in1,in2[0]*in2[1],in3);
+
+#define s0acscds0(in1) sacscds(in1);
+
+#define s2acscds2(in1,in2,in3) sacscda(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACSCD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_acsch.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_acsch.h
new file mode 100644
index 00000000..2101abe2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_acsch.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ACSCH_H__
+#define __INT_ACSCH_H__
+
+#include "acsch.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0acschd0(in1) dacschs(in1);
+
+#define d2acschd2(in1,in2,in3) dacscha(in1,in2[0]*in2[1],in3);
+
+#define s0acschs0(in1) sacschs(in1);
+
+#define s2acschs2(in1,in2,in3) sacscha(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ACSCH_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_asec.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_asec.h
new file mode 100644
index 00000000..25a1f111
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_asec.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ASEC_H__
+#define __INT_ASEC_H__
+
+#include "asec.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0asecd0(in1) dasecs(in1);
+
+#define d2asecd2(in1,in2,in3) daseca(in1,in2[0]*in2[1],in3);
+
+#define s0asecs0(in1) sasecs(in1);
+
+#define s2asecs2(in1,in2,in3) saseca(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASEC_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_asecd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_asecd.h
new file mode 100644
index 00000000..a722b6b8
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_asecd.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ASECD_H__
+#define __INT_ASECD_H__
+
+#include "asecd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0asecdd0(in1) dasecds(in1);
+
+#define d2asecdd2(in1,in2,in3) dasecda(in1,in2[0]*in2[1],in3);
+
+#define s0asecds0(in1) sasecds(in1);
+
+#define s2asecds2(in1,in2,in3) sasecda(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASECD_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_asech.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_asech.h
new file mode 100644
index 00000000..c6830f5c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_asech.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ASECH_H__
+#define __INT_ASECH_H__
+
+#include "asech.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0asechd0(in1) dasechs(in1);
+
+#define d2asechd2(in1,in2,in3) dasecha(in1,in2[0]*in2[1],in3);
+
+#define s0asechs0(in1) sasechs(in1);
+
+#define s2asechs2(in1,in2,in3) sasecha(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASECH_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_asind.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_asind.h
new file mode 100644
index 00000000..fe640ea5
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_asind.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ASIND_H__
+#define __INT_ASIND_H__
+
+#include "asind.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0asindd0(in1) dasinds(in1);
+
+#define d2asindd2(in1,in2,in3) dasinda(in1,in2[0]*in2[1],in3);
+
+#define s0asinds0(in1) sasinds(in1);
+
+#define s2asinds2(in1,in2,in3) sasinda(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ASIND_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_atand.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_atand.h
new file mode 100644
index 00000000..0adc9065
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_atand.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+#ifndef __INT_ATAND_H__
+#define __INT_ATAND_H__
+
+#include "atand.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0atandd0(in1) datands(in1);
+
+#define d2atandd2(in1,in2,in3) datanda(in1,in2[0]*in2[1],in3);
+
+#define s0atands0(in1) satands(in1);
+
+#define s2atands2(in1,in2,in3) satanda(in1,in2[0]*in2[1],in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__ATAND_H__ */
+
diff --git a/2.3-1/src/c/elementaryFunctions/linspace/dlinspacea.c~ b/2.3-1/src/c/elementaryFunctions/linspace/dlinspacea.c~
deleted file mode 100644
index f67968d6..00000000
--- a/2.3-1/src/c/elementaryFunctions/linspace/dlinspacea.c~
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Scilab2C FOSSEE IIT Bombay
- */
-
-#include "linspace.h"
-void dlinspacea(double *low_limit,int _row,double *up_limit,double range_num,double *out)
-{
- int i,j,k;
- double temp;
- float step_iterate[_row]; // for each row the spacing between two values is different.
- for(i=0;i<_row;i++)
- {
-
- step_iterate[i] = (up_limit[i]-low_limit[i])/(range_num-1);
-
- }
- for(j=0;j < _row;j++)
- {
- out[j] = low_limit[j]; // For every row first element is the first value of low_limit array
- temp = low_limit[j];
- for(k=1;k < (double)range_num;k++ )
- {
- out[(_row*k)+j] = temp + step_iterate[j]; /* Output matrix positions for 3 X 5 matrix are [0 3 6 9 12;1 4 7 10 13;2 5 8 11 14] so (_row*k)+j) used*/
- temp = out[(_row*k)+j];
- if(k == (double)range_num-1 )
- {
- out[(_row*k)+j] = (double)up_limit[j]; // Last value of output is equal to first value of up_limit array
- }
-
- }
-
-
- }
-
-
-
-
-}
-
diff --git a/2.3-1/src/c/elementaryFunctions/linspace/dlinspaces.c~ b/2.3-1/src/c/elementaryFunctions/linspace/dlinspaces.c~
deleted file mode 100644
index 82b88e34..00000000
--- a/2.3-1/src/c/elementaryFunctions/linspace/dlinspaces.c~
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Scilab2C FOSSEE IIT Bombay
- */
-
-#include "linspace.h"
-void dlinspaces(double low_limit,double up_limit,double range_num,double *out)
-{
- int j;
- double temp = low_limit;
- float step_iterate = (up_limit-low_limit)/(range_num-1);
- out[0] = low_limit; //First value of output is equal to low_limit value
- for(j=1; j<(double)range_num; j++)
- {
- out[j] = temp + step_iterate;
- temp = out[j];
- if(j == (double)range_num-1 )
- {
- out[j] = (double)up_limit; // Last value of output is equal to up_limit value
- }
- }
-
-
-
-}
-
diff --git a/2.3-1/src/c/elementaryFunctions/linspace/u8linspacea.c~ b/2.3-1/src/c/elementaryFunctions/linspace/u8linspacea.c~
deleted file mode 100644
index 2e623fa6..00000000
--- a/2.3-1/src/c/elementaryFunctions/linspace/u8linspacea.c~
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Scilab2C FOSSEE IIT Bombay
- */
-
-#include "linspace.h"
-void u8linspacea(uint8 *low_limit,int _row,uint8 *up_limit,double range_num,uint8 *out)
-{
- int i,j,k;
- uint8 temp;
- float step_iterate[_row]; // for each row the spacing between two values is different.
- for(i=0;i<_row;i++)
- {
-
- step_iterate[i] = (up_limit[i]-low_limit[i])/(range_num-1);
-
- }
- for(j=0;j < _row;j++)
- {
- out[j] = low_limit[j]; // For every row first element is the first value of low_limit array
- temp = low_limit[j];
- for(k=1;k < (double)range_num;k++ )
- {
- out[(_row*k)+j] = temp + step_iterate[j]; /* Output matrix positions for 3 X 5 matrix are [0 3 6 9 12;1 4 7 10 13;2 5 8 11 14] so (_row*k)+j) used*/
- temp = out[(_row*k)+j];
- if(k == (double)range_num-1 )
- {
- out[(_row*k)+j] = (uint8)up_limit[j]; // Last value of output is equal to first value of up_limit array
- }
-
- }
-
-
- }
-
-
-
-
-}
-
diff --git a/2.3-1/src/c/elementaryFunctions/linspace/u8linspaces.c~ b/2.3-1/src/c/elementaryFunctions/linspace/u8linspaces.c~
deleted file mode 100644
index 0320a276..00000000
--- a/2.3-1/src/c/elementaryFunctions/linspace/u8linspaces.c~
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Scilab2C FOSSEE IIT Bombay
- */
-
-#include "linspace.h"
-void u8linspaces(uint8 low_limit,uint8 up_limit,double range_num,uint8 *out)
-{
- int j;
- uint8 temp = low_limit;
- float step_iterate = (up_limit-low_limit)/(range_num-1);
- out[0] = low_limit; //First value of output is equal to low_limit value
- for(j=1; j<(double)range_num; j++)
- {
- out[j] = temp + step_iterate;
- temp = out[j];
- if(j == (double)range_num-1 )
- {
- out[j] = (uint8)up_limit; // Last value of output is equal to up_limit value
- }
- }
-
-
-
-}
-
diff --git a/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c b/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c
index f9d310b8..66f491b2 100644
--- a/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c
+++ b/2.3-1/src/c/hardware/avr/adc/u8AVRADCSetups.c
@@ -1,19 +1,19 @@
// Function to initialise ADC of AVR
//
// Calling Sequence
-// AVRSetupADC(uint8 prescalar, uint8 adc_ref)
+// AVRSetupADC(uint8 prescaler, uint8 adc_ref)
//
// Parameters
-// prescalar: prescalar to be used for generating ADC clock (0-7)
+// prescaler: prescaler 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
+// This function initialises ADc of AVR with given parameters. 'prescaler' 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
+// and it given as (MCU clock/2^prescaler). Select appropriate prescaler depending
// on MCU clock. 'adc_ref' selects one of the available reference voltage sources
// available
// Examples
@@ -21,21 +21,23 @@
//
// Authors
// Siddhesh Wani
-//
+// Ashish Kamble
#include "AVRPeripheralADC.h"
-void u8AVRADCSetups(uint8 prescalar, uint8 adc_ref)
+uint8 u8AVRADCSetups(uint8 prescaler, uint8 adc_ref)
{
- /*Set the prescalar value*/
- ADCSRA |= (prescalar & 0x07);
+/*Set the prescaler value*/
+ ADCSRA |= (prescaler & 0x07);
/*Set the adc reference voltage*/
- ADMUX |= ((adc_ref & 0x03) << 6);
+ ADMUX |= ((adc_ref & 0x03) << 6);
/*Enable ADC hardware. Set ADEN bit*/
- ADCSRA |= (1<<7);
+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
index 71fe1363..302f8c82 100644
--- a/2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c
+++ b/2.3-1/src/c/hardware/avr/adc/u8AVRReadADCs.c
@@ -1,3 +1,13 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
// Function to get voltage on analog pin on AVR
//
// Calling Sequence
@@ -22,25 +32,51 @@
//
// Authors
// Siddhesh Wani
-//
+// Ashish Kamble
#include "AVRPeripheralADC.h"
-uint16 u8AVRReadADCs(uint8 channel)
+uint8 u8AVRReadADCs(uint8 channel)
{
- /*Set ADC conversion channel*/
- ADMUX |= (channel & 0x1F);
+
+uint8 i;
+
+ ADCH=0x00;
+
+ i=channel&0x07;
+ ADMUX=i|0x60; //i|0x40 for 10 bits
+ ADCSRA|=1<<ADSC;
+
+ while(ADCSRA & (1<<ADSC)); // wait for conv. to complete
+ uint8 temp=ADCH; //unsigned int temp=ADC; for 10 bits
+
+ return temp;
+
+}
+
+
+
+
+
+
+
+
+
+
+/*Set ADC conversion channel*/
+// ADMUX |= (channel & 0x1F);
/*Start ADC conversion. Set 'ADSC' bit*/
- ADCSRA |= (1<<6);
+// ADCSRA |= (1<<6);
/*Wait for conversion to complete. Check 'ADIF' bit*/
- while(!(ADCSRA & (1<<4)));
+// while(!(ADCSRA & (1<<4)));
/*Clear ADIF flag*/
- ADCSRA |= (1<<4);
+// ADCSRA |= (1<<4);
/*ADC conversion result is stored in ADCH/L registers*/
- return (ADC);
-}
+// return (ADC);
+
+
diff --git a/2.3-1/src/c/hardware/avr/default_files/Makefile b/2.3-1/src/c/hardware/avr/default_files/Makefile
new file mode 100644
index 00000000..c388196b
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/default_files/Makefile
@@ -0,0 +1,387 @@
+
+# make all = Make software and program
+# make clean = Clean out built project files.
+# make program = Download the hex file to the device, using avrdude. Please
+# customize the avrdude settings below first!
+
+# Microcontroller Type
+MCU = atmega16
+
+# Target file name (without extension).
+TARGET = main
+
+# Programming hardware:
+AVRDUDE_PROGRAMMER = usbasp
+
+AVRDUDE_PORT = /dev/usb
+
+############# Don't need to change below here for most purposes (Elliot)
+
+# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+OPT = s
+
+# Output format. (can be srec, ihex, binary)
+FORMAT = ihex
+
+
+CSRCDIR = src/c
+HSRCDIR = includes
+ISRCDIR = interfaces
+SCI2CDIR = .
+# List C source files here. (C dependencies are automatically generated.)
+SRC = $(wildcard $(CSRCDIR)/*.c) main.c
+
+# If there is more than one source file, append them above, or modify and
+# uncomment the following:
+#SRC += foo.c bar.c
+
+# You can also wrap lines by appending a backslash to the end of the line:
+#SRC += baz.c \
+#xyzzy.c
+
+
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = includes interfaces
+EXTRALIBDIRS = .
+
+
+# Optional compiler flags.
+# -g: generate debugging information (for GDB, or for COFF conversion)
+# -O*: optimization level
+# -f...: tuning, see gcc manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlms: create assembler listing
+#CFLAGS = -g -O$(OPT) \
+#-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \
+#-Wall -Wstrict-prototypes \
+#-Wa,-adhlns=$(<:.c=.lst) \
+#$(patsubst %,-I%,$(EXTRAINCDIRS))
+CFLAGS = -g -Wall $(patsubst %,-I%,$(EXTRAINCDIRS)) $(patsubst %,-L%,$(EXTRALIBDIRS))
+
+# Set a "language standard" compiler flag.
+# Unremark just one line below to set the language standard to use.
+# gnu99 = C99 + GNU extensions. See GCC manual for more information.
+#CFLAGS += -std=c89
+#CFLAGS += -std=gnu89
+#CFLAGS += -std=c99
+#CFLAGS += -std=gnu99
+
+
+
+# Optional assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlms: create listing
+# -gstabs: have the assembler create line number information; note that
+# for use in COFF files, additional information about filenames
+# and function names needs to be present in the assembler source
+# files -- see avr-libc docs [FIXME: not yet described there]
+ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
+
+
+
+# Optional linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
+
+
+
+# Additional libraries
+
+# Minimalistic printf version
+#LDFLAGS += -Wl,-u,vfprintf -lprintf_min
+
+# Floating point printf version (requires -lm below)
+#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt
+
+# -lm = math library
+LDFLAGS += -lc
+LDFLAGS += -lm
+
+# Programming support using avrdude. Settings and variables.
+
+
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
+
+AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
+
+# Uncomment the following if you want avrdude's erase cycle counter.
+# Note that this counter needs to be initialized first using -Yn,
+# see avrdude manual.
+#AVRDUDE_ERASE += -y
+
+# Uncomment the following if you do /not/ wish a verification to be
+# performed after programming the device.
+#AVRDUDE_FLAGS += -V
+
+# Increase verbosity level. Please use this when submitting bug
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
+# to submit bug reports.
+#AVRDUDE_FLAGS += -v -v
+
+#Run while cable attached or don't
+AVRDUDE_FLAGS += -E reset #keep chip disabled while cable attached
+#AVRDUDE_FLAGS += -E noreset
+
+#AVRDUDE_WRITE_FLASH = -U lfuse:w:0x04:m #run with 8 Mhz clock
+
+#AVRDUDE_WRITE_FLASH = -U lfuse:w:0x21:m #run with 1 Mhz clock #default clock mode
+
+#AVRDUDE_WRITE_FLASH = -U lfuse:w:0x01:m #run with 1 Mhz clock no start up time
+
+# ---------------------------------------------------------------------------
+
+# Define directories, if needed.
+DIRAVR = /usr/lib/avr
+DIRAVRBIN = $(DIRAVR)/bin
+DIRAVRUTILS = $(DIRAVR)/utils/bin
+DIRINC = $(DIRAVR)/include
+DIRLIB = $(DIRAVR)/lib
+
+
+# Define programs and commands.
+SHELL = sh
+
+CC = avr-gcc
+
+OBJCOPY = avr-objcopy
+OBJDUMP = avr-objdump
+SIZE = avr-size
+AR = avr-ar
+
+# Programming support using avrdude.
+AVRDUDE = avrdude
+
+
+REMOVE = rm -f
+COPY = cp
+
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+
+
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = -------- begin --------
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_COFF = Converting to AVR COFF:
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
+MSG_FLASH = Creating load file for Flash:
+MSG_EEPROM = Creating load file for EEPROM:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling:
+MSG_ASSEMBLING = Assembling:
+MSG_CLEANING = Cleaning project:
+
+
+
+
+# Define all object files.
+OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
+
+#LOCAL_LIB
+LOCAL_LIB = main.a
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+
+# Default target: make program!
+all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \
+ $(TARGET).lss $(TARGET).sym sizeafter finished end
+# $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
+
+# Eye candy.
+# AVR Studio 3.x does not check make's exit code but relies on
+# the following magic strings to be generated by the compile job.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+
+
+
+# Convert ELF to COFF for use in debugging / simulating in
+# AVR Studio or VMLAB.
+COFFCONVERT=$(OBJCOPY) --debugging \
+ --change-section-address .data-0x800000 \
+ --change-section-address .bss-0x800000 \
+ --change-section-address .noinit-0x800000 \
+ --change-section-address .eeprom-0x810000
+
+
+coff: $(TARGET).elf
+ @echo
+ @echo $(MSG_COFF) $(TARGET).cof
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
+
+
+extcoff: $(TARGET).elf
+ @echo
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
+
+
+
+
+# Program the device.
+program: $(TARGET).hex $(TARGET).eep
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
+
+
+
+
+# Create final output files (.hex, .eep) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
+
+%.eep: %.elf
+ @echo
+ @echo $(MSG_EEPROM) $@
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
+ --change-section-lma .eeprom=0 -O $(FORMAT) $< $@
+
+# Create extended listing file from ELF output file.
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S $< > $@
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ avr-nm -n $< > $@
+
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(OBJ)
+%.elf: %.a
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(ALL_CFLAGS) $(LOCAL_LIB) -o $@ $(LDFLAGS)
+
+$(LOCAL_LIB): $(OBJ)
+ $(AR) rcs $@ $(OBJ)
+
+# Compile: create object files from C source files.
+%.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files.
+%.s : %.c
+ $(CC) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files.
+%.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+
+
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).eep
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).cof
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(OBJ)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) *~
+
+# Automatically generate C source code dependencies.
+# (Code originally taken from the GNU make user manual and modified
+# (See README.txt Credits).)
+#
+# Note that this will work with sh (bash) and sed that is shipped with WinAVR
+# (see the SHELL variable defined above).
+# This may not work with other shells or other seds.
+#
+%.d: %.c
+ set -e; $(CC) -MM $(ALL_CFLAGS) $< \
+ | sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \
+ [ -s $@ ] || rm -f $@
+
+
+# Remove the '-' if you want to see the dependency files generated.
+-include $(SRC:.c=.d)
+
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \
+ clean clean_list program
diff --git a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c
index 6b61a56b..a2517b98 100644
--- a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c
+++ b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalIns.c
@@ -1,3 +1,13 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
// Function to get current state (high\low) of a digital pin on AVR
//
// Calling Sequence
@@ -28,27 +38,26 @@
uint8 u8AVRDigitalIns(uint8 port,uint8 pin)
{
- uint8 state = 0;
+ unsigned int state = 0;
if(port == PORT_A)
{
- state = (uint8)(PINA & (1<<pin));
- return state;
+ state = bit_is_clear(PINA,pin);
+ return !state;
}
if(port == PORT_B)
{
- state = (uint8)(PINB & (1<<pin));
- return state;
+ state = bit_is_clear(PINB,pin);
+ return !state;
}
if(port == PORT_C)
{
- state = (uint8)(PINC & (1<<pin));
- return state;
+ state = bit_is_clear(PINC,pin);
+ return !state;
}
if(port == PORT_D)
{
- state = (uint8)(PIND & (1<<pin));
- return state;
+ state = bit_is_clear(PIND,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
index 118da542..8998fc91 100644
--- a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c
+++ b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c
@@ -1,3 +1,13 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
// Function to change state (high\low) of a digital output pin on AVR
//
// Calling Sequence
@@ -20,7 +30,7 @@
//
// Authors
// Siddhesh Wani
-//
+// Ashish Kamble
#include "AVRPeripheralGPIO.h"
diff --git a/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalPortSetups.c b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalPortSetups.c
new file mode 100644
index 00000000..54ec7312
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/gpio/u8AVRDigitalPortSetups.c
@@ -0,0 +1,81 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+// Function to decide direction of a digital pin on AVR
+//
+// Calling Sequence
+// AVRDigitalPortSetup(port,direction)
+//
+// Parameters
+// port : port of microcontroller to be used (1 for PORTA, 2 for PORTB,...)
+// 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
+// AVRDigitalPortSetup(1,0); //this function will PortA as input Port
+//
+// Authors
+// Siddhesh Wani
+// Ashish Kamble
+
+
+#include "AVRPeripheralGPIO.h"
+
+uint8 u8AVRDigitalPortSetups(uint8 port,uint8 direction)
+{
+ if(direction == INPUT)
+ {
+ /*Set port as input*/
+ if(port == PORT_A)
+ {
+ DDRA = 0x00;
+ }
+ if(port == PORT_B)
+ {
+ DDRB = 0x00;
+ }
+ if(port == PORT_C)
+ {
+ DDRC = 0x00;
+ }
+ if(port == PORT_D)
+ {
+ DDRD = 0x00;
+ }
+ }
+ else
+ {
+ /*Set port as output*/
+ if(port == PORT_A)
+ {
+ DDRA = 0xFF;
+ }
+ if(port == PORT_B)
+ {
+ DDRB = 0xFF;
+ }
+ if(port == PORT_C)
+ {
+ DDRC = 0xFF;
+ }
+ if(port == PORT_D)
+ {
+ DDRD = 0xFF;
+ }
+ }
+ 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
index 736c3406..2a27e37d 100644
--- a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralADC.h
@@ -15,9 +15,9 @@ extern "C" {
#endif
//Function prototypes
-void u8AVRADCSetups(uint8 prescalar, uint8 adc_ref);
+uint8 u8AVRADCSetups(uint8 prescaler, uint8 adc_ref);
-uint16 u8AVRReadADCs(uint8 channel);
+uint8 u8AVRReadADCs(uint8 channel);
#ifdef __cplusplus
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h
index 37f2377e..9a8d2d65 100644
--- a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralGPIO.h
@@ -1,8 +1,14 @@
-//This file defines constants corresponding to gpios and digital input functions.
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
#ifndef __AVRPERIPHERALGPIO_H__
#define __AVRPERIPHERALGPIO_H__
@@ -38,6 +44,9 @@ uint8 u8AVRDigitalIns(uint8 port,uint8 pin);
void u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state);
+uint8 u8AVRDigitalPortSetups(uint8 port,uint8 direction);
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralPWM.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralPWM.h
index 2e41db6e..2107a5a4 100644
--- a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralPWM.h
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralPWM.h
@@ -1,7 +1,7 @@
//This file defines functions prototypes related to PWM.
//
// Authors
-// Siddhesh Wani
+// Ashish Kamble
//
#ifndef __AVRPERIPHERALPWM_H__
@@ -15,10 +15,17 @@ extern "C" {
#endif
//Function prototypes
-void u8AVRPWMSetups(uint8 timer, uint8 prescalar, uint8 waveform_mode, uint8 output_mode);
+uint8 u8AVRPWM0Setups(uint8 waveform_mode, uint8 output_mode);
-void u8AVRPWMSetDutys(uint8 timer, uint8 duty);
+uint8 u8AVRPWM2Setups(uint8 waveform_mode, uint8 output_mode);
+uint8 u8AVRPWM1Setups(uint8 waveform_mode, uint8 output_mode, uint8 output_pin);
+
+uint8 u8AVRPWM0SetDutys(uint8 duty);
+
+uint8 u8AVRPWM2SetDutys(uint8 duty);
+
+uint8 u8AVRPWM1SetDutys(uint8 output_pin, uint16 duty, uint16 Top_Value);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralTimer.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralTimer.h
index 78b04aae..ab087692 100644
--- a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralTimer.h
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralTimer.h
@@ -1,8 +1,13 @@
-//This file defines functions prototypes related to Timer.
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
#ifndef __AVRPERIPHERALTIMER_H__
#define __AVRPERIPHERALTIMER_H__
@@ -15,10 +20,10 @@ extern "C" {
#endif
//Function prototypes
-uint8 u8AVRTimerSetups(uint8 timer, uint8 prescalar);
-uint8 u8AVRGetTimerValue(uint8 timer);
+uint16 u8AVRGetTimerValues(uint16 timer);
+uint8 u8AVRTimerSetups(uint8 timer, uint16 prescaler,uint8 clock_source);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRPeripheralUART.h b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralUART.h
new file mode 100644
index 00000000..09db3b03
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/includes/AVRPeripheralUART.h
@@ -0,0 +1,59 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+
+#ifndef __AVRPERIPHERALUART_H__
+#define __AVRPERIPHERALUART_H__
+
+#include <avr/io.h>
+#include "types.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//Function prototypes
+uint8 u8AVRUARTSetups(uint8 mode, uint32 baudrate, uint8 stopbits, uint8 parity);
+
+uint8 u8AVRUARTTransmits(uint8 data);
+
+uint8 gAVRUARTTransmits(char* msg,int size);
+
+uint8 u16AVRUARTTransmits(uint16 data);
+
+uint8 i16AVRUARTTransmits(int16 data);
+
+uint8 i8AVRUARTTransmits(int8 data);
+
+//uint8 sAVRUARTTransmits(float data);
+
+uint8 u8AVRUARTTransmita(uint8 *x,int size);
+
+//uint8 gAVRUARTTransmita(uint8 *x,int size);
+
+uint8 u16AVRUARTTransmita(uint16 *x,int size);
+
+uint8 i16AVRUARTTransmita(int16 *x,int size);
+
+uint8 i8AVRUARTTransmita(int8 *x,int size);
+
+uint8 u8AVRUSARTReceiveCharu8();
+
+uint8 dAVRUARTTransmits(double data);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__AVRUART_H__ */
+
+
diff --git a/2.3-1/src/c/hardware/avr/includes/AVRUtil.h b/2.3-1/src/c/hardware/avr/includes/AVRUtil.h
index 0aa1923f..55789bef 100644
--- a/2.3-1/src/c/hardware/avr/includes/AVRUtil.h
+++ b/2.3-1/src/c/hardware/avr/includes/AVRUtil.h
@@ -1,8 +1,14 @@
-//This file defines functions corresponding to delay functions
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Siddhesh Wani
+// Email: toolbox@scilab.in
+
#ifndef __AVRUTIL_H__
#define __AVRUTIL_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
index 425b03fc..5d3a48e5 100644
--- a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h
@@ -1,8 +1,14 @@
-//This file defines constants corresponding to gpios.
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Aithor: Ashish Kamble
+// Email: toolbox@scilab.in
+
#ifndef __INT_AVRPERIPHERALADC_H__
#define __INT_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
index c034718c..3fcbb8f5 100644
--- a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h
@@ -1,8 +1,15 @@
-//This file defines constants corresponding to gpios.
-//
-// Authors
-// Siddhesh Wani
+
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Siddhesh Wani, Ashish Kamble
+// Email: toolbox@scilab.in
+
#ifndef __INT_AVRPERIPHERALGPIO_H__
#define __INT_AVRPERIPHERALGPIO_H__
@@ -22,6 +29,10 @@ extern "C" {
#define AVRDigitalOut(in1,in2,in3) u8AVRDigitalOuts((uint8) in1,\
(uint8) in2, (uint8) in3);
+#define AVRDigitalPortSetup(in1,in2) u8AVRDigitalPortSetups((uint8) in1,\
+ (uint8) in2);
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralPWM.h b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralPWM.h
index 2d5e5cbd..5c5950bc 100644
--- a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralPWM.h
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralPWM.h
@@ -1,8 +1,14 @@
-//This file defines constants corresponding to gpios.
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
#ifndef __INT_AVRPERIPHERALPWM_H__
#define __INT_AVRPERIPHERALPWM_H__
@@ -14,10 +20,17 @@
extern "C" {
#endif
-#define AVRPWMSetup(in1,in2,in3,in4) u8AVRPWMSetups((uint8) in1,\
- (uint8) in2, (uint8) in3, (uint8) in4);
+#define AVRPWM0Setup(in1,in2) u8AVRPWM0Setups((uint8) in1, (uint8) in2);
+
+#define AVRPWM2Setup(in1,in2) u8AVRPWM2Setups((uint8) in1, (uint8) in2);
+
+#define AVRPWM1Setup(in1,in2,in3) u8AVRPWM1Setups((uint8) in1, (uint8) in2, (uint8) in3);
+
+#define AVRPWM0SetDuty(in1) u8AVRPWM0SetDutys((uint8) in1);
+
+#define AVRPWM2SetDuty(in1) u8AVRPWM2SetDutys((uint8) in1);
-#define AVRPWMSetDuty(in1,in2) u8AVRPWMSetDutys((uint8) in1, (uint8) in2);
+#define AVRPWM1SetDuty(in1,in2,in3) u8AVRPWM1SetDutys((uint8) in1,(uint16) in2,(uint16) in3);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralTimer.h b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralTimer.h
index b4b66bae..3ec6a7ec 100644
--- a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralTimer.h
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralTimer.h
@@ -1,8 +1,14 @@
-//This file defines constants corresponding to gpios.
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Siddhesh Wani, Ashish Kamble
+// Email: toolbox@scilab.in
+
#ifndef __INT_AVRPERIPHERALTIMER_H__
#define __INT_AVRPERIPHERALTIMER_H__
@@ -14,9 +20,9 @@
extern "C" {
#endif
-#define AVRTimerSetup(in1,in2) u8AVRTimerSetups((uint8) in1, (uint8) in2);
+#define AVRGetTimerValue(in1) u8AVRGetTimerValues((uint16) in1);
-#define AVRGetTimerValue(in1) u8AVRGetTimerValues((uint8) in1);
+#define AVRTimerSetup(in1,in2,in3) u8AVRTimerSetups((uint8) in1, (uint16) in2, (uint8) in3);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralUART.h b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralUART.h
new file mode 100644
index 00000000..81b4af68
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRPeripheralUART.h
@@ -0,0 +1,57 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Authors: Siddhesh Wani, Ashish Kamble
+// Email: toolbox@scilab.in
+
+
+#ifndef __INT_AVRPERIPHERALUART_H__
+#define __INT_AVRPERIPHERALUART_H__
+
+#include <avr/io.h>
+#include "AVRPeripheralUART.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define AVRUARTSetup(in1,in2,in3,in4) u8AVRUARTSetups((uint8) in1,(uint32) in2,(uint8) in3,(uint8) in4);
+
+#define u80AVRUARTTransmitu80(in1) u8AVRUARTTransmits((uint8) in1);
+
+#define g2AVRUARTTransmitu80(in1,in2) gAVRUARTTransmits((char*) in1,in2[0]*in2[1]);
+
+#define u160AVRUARTTransmitu80(in1) u16AVRUARTTransmits((uint16) in1);
+
+#define i160AVRUARTTransmitu80(in1) i16AVRUARTTransmits((int16) in1);
+
+#define i80AVRUARTTransmitu80(in1) i8AVRUARTTransmits((int8) in1);
+
+#define u82AVRUARTTransmitu80(in1,in2) u8AVRUARTTransmita((uint8) in1,in2[0]*in2[1]);
+
+#define d0AVRUARTTransmitu80(in1) dAVRUARTTransmits((double) in1);
+
+//#define g2AVRUARTTransmitu80(in1,in2) gAVRUARTTransmita((char*) in1,in2[0]*in2[1]);
+
+#define u162AVRUARTTransmitu80(in1,in2) u16AVRUARTTransmita((uint16) in1,in2[0]*in2[1]);
+
+#define i162AVRUARTTransmitu80(in1,in2) i16AVRUARTTransmita((int16) in1,in2[0]*in2[1]);
+
+#define i82AVRUARTTransmitu80(in1,in2) i8AVRUARTTransmita((int8) in1,in2[0]*in2[1]);
+
+#define u80AVRUSARTReceiveCharu80() u8AVRUSARTReceiveCharu8();
+
+//#define s0AVRUARTTransmitu80(in1) sAVRUARTTransmits((float) in1);
+
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__AVRPERIPHERALUART_H__ */
diff --git a/2.3-1/src/c/hardware/avr/interfaces/int_AVRUtil.h b/2.3-1/src/c/hardware/avr/interfaces/int_AVRUtil.h
index 2d6bbef7..51cbce58 100644
--- a/2.3-1/src/c/hardware/avr/interfaces/int_AVRUtil.h
+++ b/2.3-1/src/c/hardware/avr/interfaces/int_AVRUtil.h
@@ -1,8 +1,14 @@
-//This file defines interfaces corresponding to uitl function.
-//
-// Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Siddhesh Wani
+// Email: toolbox@scilab.in
+
#ifndef __INT_AVRUTIL_H__
#define __INT_AVRUTIL_H__
@@ -14,7 +20,10 @@
extern "C" {
#endif
-#define d0sleepu80(in1) u16AVRSleeps ((uint16) in1);
+//#define d0sleepu80(in1) u16AVRSleeps ((uint16) in1);
+
+#define AVRSleep(in1) u16AVRSleeps ((uint16) in1);
+
#ifdef __cplusplus
} /* extern "C" */
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0SetDutys.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0SetDutys.c
new file mode 100644
index 00000000..106a872e
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0SetDutys.c
@@ -0,0 +1,24 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Set Duty cycle of PWM Output generated by Timer0 at OC0 pin.
+
+
+#include "AVRPeripheralPWM.h"
+
+uint8 u8AVRPWM0SetDutys(uint8 duty)
+{
+ uint8 duty_value = 0;
+ duty_value = (((uint16)(duty * 0xff))/100);
+ OCR0 = duty_value;
+ return 0;
+}
+
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0Setups.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0Setups.c
new file mode 100644
index 00000000..131ee68b
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM0Setups.c
@@ -0,0 +1,50 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Setup PWM output for OC0 pin.
+
+
+#include "AVRPeripheralPWM.h"
+
+
+uint8 u8AVRPWM0Setups(uint8 waveform_mode, uint8 output_mode)
+{
+ switch(waveform_mode)
+ {
+ case 0:
+ TCCR0 |= (1<<WGM00);
+ break;
+
+ case 1:
+ TCCR0 |= (1<<WGM00)|(1<<WGM01);
+ break;
+
+ case 2:
+ TCCR0 |= (1<<WGM01);
+ break;
+ }
+ switch(output_mode)
+ {
+ case 0:
+ TCCR0 |= (1<<COM01);
+ break;
+
+ case 1:
+ TCCR0 |= (1<<COM00)|(1<<COM01);
+ break;
+
+ case 2:
+ TCCR0 |= (1<<COM00);
+ break;
+ }
+ return 0;
+}
+
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1SetDutys.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1SetDutys.c
new file mode 100644
index 00000000..47aad1c8
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1SetDutys.c
@@ -0,0 +1,31 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Set Duty cycle and Top Value of PWM Output generated by Timer1 at OC1A or OC1B pin.
+
+#include "AVRPeripheralPWM.h"
+
+uint8 u8AVRPWM1SetDutys(uint8 output_pin, uint16 duty, uint16 Top_Value)
+{
+ uint16 duty_value = 0;
+ ICR1 = Top_Value;
+ if(output_pin==0)
+ {
+ duty_value = (((uint16)(duty * Top_Value))/100);
+ OCR1A = duty_value;
+ }
+ else if(output_pin==1)
+ {
+ duty_value = (((uint16)(duty * Top_Value))/100);
+ OCR1B = duty_value;
+ }
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1Setups.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1Setups.c
new file mode 100644
index 00000000..b3f2d8f4
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM1Setups.c
@@ -0,0 +1,69 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Setup PWM output for OC1A or OC1B pin.
+
+#include "AVRPeripheralPWM.h"
+
+uint8 u8AVRPWM1Setups(uint8 waveform_mode, uint8 output_mode, uint8 output_pin)
+{
+ switch(waveform_mode)
+ {
+ case 0:
+ TCCR1A |= (1<<WGM11);
+ TCCR1B |= (1<<WGM13);
+ break;
+
+ case 1:
+ TCCR1A |= (1<<WGM11);
+ TCCR1B |= (1<<WGM12)|(1<<WGM13);
+ break;
+
+ case 2:
+ TCCR1B |= (1<<WGM12)|(1<<WGM13);
+ break;
+ }
+ if(output_pin==0)
+ {
+ switch(output_mode)
+ {
+ case 0:
+ TCCR1A |= (1<<COM1A1);
+ break;
+
+ case 1:
+ TCCR1A |= (1<<COM1A0)|(1<<COM1A1);
+ break;
+
+ case 2:
+ TCCR1A |= (1<<COM1A0);
+ break;
+ }
+ }
+ else if(output_pin==1)
+ {
+ switch(output_mode==0)
+ {
+ case 0:
+ TCCR1A |= (1<<COM1B1);
+ break;
+
+ case 1:
+ TCCR1A |= (1<<COM1B0)|(1<<COM1B1);
+ break;
+
+ case 2:
+ TCCR1A |= (1<<COM1B0);
+ break;
+ }
+ }
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2SetDutys.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2SetDutys.c
new file mode 100644
index 00000000..e0b53186
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2SetDutys.c
@@ -0,0 +1,22 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Set Duty cycle of PWM Output generated by Timer2 at OC2 pin.
+
+#include "AVRPeripheralPWM.h"
+
+uint8 u8AVRPWM2SetDutys(uint8 duty)
+{
+ uint8 duty_value = 0;
+ duty_value = (uint8)(((uint16)(duty * 0xff))/100);
+ OCR2 = duty_value;
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2Setups.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2Setups.c
new file mode 100644
index 00000000..f5f87672
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWM2Setups.c
@@ -0,0 +1,47 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Setup PWM output for OC2 pin.
+
+#include "AVRPeripheralPWM.h"
+
+uint8 u8AVRPWM2Setups(uint8 waveform_mode, uint8 output_mode)
+{
+ switch(waveform_mode)
+ {
+ case 0:
+ TCCR2 |= (1<<WGM20);
+ break;
+
+ case 1:
+ TCCR2 |= (1<<WGM20)|(1<<WGM21);
+ break;
+
+ case 2:
+ TCCR2 |= (1<<WGM21);
+ break;
+ }
+ switch(output_mode)
+ {
+ case 0:
+ TCCR2 |= (1<<COM21);
+ break;
+
+ case 1:
+ TCCR2 |= (1<<COM20)|(1<<COM21);
+ break;
+
+ case 2:
+ TCCR2 |= (1<<COM20);
+ break;
+ }
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetDutys.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetDutys.c
deleted file mode 100644
index 0f358fc3..00000000
--- a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetDutys.c
+++ /dev/null
@@ -1,39 +0,0 @@
-// Function to set duty for PWM of AVR
-//
-// Calling Sequence
-// u8AVRPWMSetDutys(uint8 timer, uint8 duty)
-//
-// Parameters
-// timer: timer to be used for PWM generation (0,1,2)
-// duty: duty for PWM waveform (0-100)
-//
-// Description
-// This function sets duty for PWM waveform according to given parameters.
-//
-// Examples
-// u8AVRPWMSetDutys(0,10) //Sets 10% duty for timer 0 output.
-//
-// Authors
-// Siddhesh Wani
-//
-
-#include "AVRPeripheralPWM.h"
-
-void u8AVRPWMSetDutys(uint8 timer, uint8 duty)
-{
- uint8 duty_value=0;
-
- switch(timer)
- {
- case 0:
- duty_value = (uint8)(((uint16)(duty * 0xff))/100);
- OCR0 = duty_value;
- break;
- case 2:
- duty_value = (uint8)(((uint16)(duty * 0xff))/100);
- OCR2 = duty_value;
- break;
- }
-
-
-}
diff --git a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetups.c b/2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetups.c
deleted file mode 100644
index 945f2312..00000000
--- a/2.3-1/src/c/hardware/avr/pwm/u8AVRPWMSetups.c
+++ /dev/null
@@ -1,60 +0,0 @@
-// Function to initialise PWM of AVR
-//
-// Calling Sequence
-// u8AVRPWMSetups(uint8 timer, uint8 prescalar, uint8 waveform_mode, uint8 output_mode)
-//
-// Parameters
-// timer: timer to be used for PWM generation (0,1,2)
-// prescalar: prescalar to be used for generating PWM waveform (0-7)
-// waveform_mode: decides type of waveform generation
-// 0 -> Normal mode
-// 1 -> Phase correct mode
-// 2 -> CTC mode
-// 3 -> Fase PWM mode
-// output_mode: decides the compare output mode. (0-3)
-// behaviour of the output is different for different inputs
-// depending upon 'waveform_mode' chosen.
-// ***Refer datasheet for more description about above modes
-//
-// Description
-// This function initialises PWM of AVR with given parameters. 'timer'
-// decides which of the three (0,1,2) timers available to be used. The
-// 'prescalar' is needed for deciding PWM clock. Select appropriate prescalar
-// depending on MCU clock. Choose required pwmmode using 'waveform_generation'
-// and 'output_mode'. Please refer datasheet for more description of 'wafefom_mode'
-// and 'output mode'.
-// Examples
-// AVRPWMSetup(0,1,2,2)
-//
-// Authors
-// Siddhesh Wani
-//
-
-#include "AVRPeripheralPWM.h"
-
-
-void u8AVRPWMSetups(uint8 timer, uint8 prescalar, uint8 waveform_mode, uint8 output_mode)
-{
- switch(timer)
- {
- case 0:
- TCCR0|= (prescalar & 0x07); //Select clock source
- //Select waveform generation mode
- TCCR0|= ((waveform_mode & 0x04) << 4);
- //Select compare output mode
- TCCR0 |= ((output_mode & 0x01) << 3); //WGM0
- TCCR0 |= ((output_mode & 0x02) << 6); //WGM1
- break;
- case 1:
- break;
- case 2:
- TCCR2|= (prescalar & 0x07); //Select clock source
- //Select waveform generation mode
- TCCR2|= ((waveform_mode & 0x04) << 4);
- //Select compare output mode
- TCCR2 |= ((output_mode & 0x01) << 3); //WGM0
- TCCR2 |= ((output_mode & 0x02) << 6); //WGM1
- break;
- }
-}
-
diff --git a/2.3-1/src/c/hardware/avr/timer/u16AVRGetTimerValues.c b/2.3-1/src/c/hardware/avr/timer/u16AVRGetTimerValues.c
new file mode 100644
index 00000000..8ef16e8d
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/timer/u16AVRGetTimerValues.c
@@ -0,0 +1,51 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function selects the clock source and timer with prescaler.
+
+
+#include "AVRPeripheralTimer.h"
+#include <avr/interrupt.h>
+
+
+uint16 u8AVRGetTimerValues(uint16 timer)
+{
+ uint16_t x;
+ switch(timer)
+ {
+ case 0:
+ {
+ x = TCNT0;
+ break;
+ }
+
+ case 1:
+ {
+ unsigned char sreg;
+ unsigned int val;
+ sreg = SREG;
+ cli();
+ val = TCNT1;
+ SREG = sreg;
+ sei();
+ x = val;
+ break;
+ }
+
+ case 2:
+ {
+ x = TCNT2;
+ break;
+ }
+ }
+return x;
+}
+
diff --git a/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c b/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c
index c542c182..e08bb3a6 100644
--- a/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c
+++ b/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c
@@ -1,3 +1,14 @@
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+
// Function to get timer count
//
// Calling Sequence
@@ -12,26 +23,41 @@
//
//
// Authors
-// Siddhesh Wani
+// Ashish Kamble
//
#include "AVRPeripheralTimer.h"
+#include <avr/interrupt.h>
-uint8 u8AVRGetTimerValues(uint8 timer)
-{
+uint16 u8AVRGetTimerValues(uint16 timer)
+{ uint16_t x;
switch(timer)
{
case 0:
- return TCNT0;
-
+ {
+ x = TCNT0;
+ break;
+ }
case 1:
- break;
+ {
+ unsigned char sreg;
+ unsigned int val;
+ sreg = SREG;
+ cli();
+ val = TCNT1;
+ SREG = sreg;
+ sei();
+ x = val;
+ break;
+ }
case 2:
- return TCNT2;
+ {
+ x = TCNT2;
+ break;
+ }
}
-
- return 0;
+return x;
}
diff --git a/2.3-1/src/c/hardware/avr/timer/u8AVRTimerSetups.c b/2.3-1/src/c/hardware/avr/timer/u8AVRTimerSetups.c
index 1d93429b..6ee8d2af 100644
--- a/2.3-1/src/c/hardware/avr/timer/u8AVRTimerSetups.c
+++ b/2.3-1/src/c/hardware/avr/timer/u8AVRTimerSetups.c
@@ -1,42 +1,110 @@
-// Function to setup timer on AVR
-//
-// Calling Sequence
-// u8AVRTimerSetups(timer, prescalar)
-//
-// Parameters
-// timer: timer to be set up (0,1,2)
-// prescalar: prescalar to be used for timer (0-7)
-// ***Refer datasheet for more description about timer
-//
-// Description
-// This function sets prescalr for timers. 'timer' decides which of the
-// three (0,1,2) timers available to be used. The 'prescalar' is needed for
-// deciding timer clock. Select appropriate prescalar depending on MCU clock
-// and requirement.
-//
-//
-// Authors
-// Siddhesh Wani
-//
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function selects the clock source and timer with prescaler.
#include "AVRPeripheralTimer.h"
-
-uint8 u8AVRTimerSetups(uint8 timer,uint8 prescalar)
+uint8 u8AVRTimerSetups(uint8 timer,uint16 prescaler,uint8 clock_source)
{
- switch(timer)
- {
- case 0:
- TCCR0|= (prescalar & 0x07); //Select clock source
- break;
- case 1:
- break;
- case 2:
- TCCR2|= (prescalar & 0x07); //Select clock source
- break;
- }
-
- return 0;
+
+ if(clock_source==0)
+ {
+ if(timer==0)
+ {
+ switch(prescaler)
+ {
+ case 1: TCCR0 |= (1<<CS00);
+ TCNT0 = 0x00;
+ case 8: TCCR0 |= (1<<CS01);
+ TCNT0 = 0x00;
+ case 64: TCCR0 |= (1<<CS00)|(1<<CS01);
+ TCNT0 = 0x00;
+ case 256: TCCR0 |= (1<<CS02);
+ TCNT0 = 0x00;
+ case 1024: TCCR0 |= (1<<CS00)|(1<<CS02);
+ TCNT0 = 0x00;
+ }
+ }
+ else if(timer==2)
+ {
+ switch(prescaler)
+ {
+ case 1: TCCR2 |= (1<<CS20);
+ TCNT2 = 0x00;
+ case 8: TCCR2 |= (1<<CS21);
+ TCNT2 = 0x00;
+ case 64: TCCR2 |= (1<<CS20)|(1<<CS21);
+ TCNT2 = 0x00;
+ case 256: TCCR2 |= (1<<CS22);
+ TCNT2 = 0x00;
+ case 1024: TCCR2 |= (1<<CS20)|(1<<CS22);
+ TCNT2 = 0x00;
+ }
+ }
+ else if(timer==1)
+ {
+ switch(prescaler)
+ {
+ case 1: TCCR1B |= (1<<CS10);
+ TCNT1H = 0x00;
+ TCNT1L = 0x00;
+ case 8: TCCR1B |= (1<<CS11);
+ TCNT1H = 0x00;
+ TCNT1L = 0x00;
+ case 64: TCCR1B |= (1<<CS10)|(1<<CS11);
+ TCNT1H = 0x00;
+ TCNT1L = 0x00;
+ case 256: TCCR1B |= (1<<CS12);
+ TCNT1H = 0x00;
+ TCNT1L = 0x00;
+ case 1024: TCCR1B |= (1<<CS10)|(1<<CS12);
+ TCNT1H = 0x00;
+ TCNT1L = 0x00;
+ }
+ }
+ }
+ else if(clock_source==1)
+ {
+ if(timer==0)
+ {
+ TCCR0 |= (1<<CS00)|(1<<CS01)|(1<<CS02);
+ TCNT0 = 0x00;
+ }
+ else if(timer==2)
+ {
+ TCCR2 |= (1<<CS20)|(1<<CS21)|(1<<CS22);
+ TCNT2 = 0x00;
+ }
+ else if(timer==1)
+ {
+ TCCR1B |= (1<<CS10)|(1<<CS11)|(1<<CS12);
+ TCNT1H = 0x00;
+ TCNT1L = 0x00;
+ }
+ }
+ return 0;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmits.c b/2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmits.c
new file mode 100644
index 00000000..ec63c4de
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmits.c
@@ -0,0 +1,88 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Not Tested//
+#include "AVRPeripheralUART.h"
+#include<math.h>
+
+
+uint8 dAVRUARTTransmits(double data)
+{
+ //Extract integer part
+ long int intpart = (long int)data;
+ //Extract double part
+ //double floatpart = data - (double)intpart;
+ char* str;
+ int i = 0;
+ while(intpart)
+ {
+ str[i] = (intpart%10) + '0';
+ intpart = intpart/10;
+ i++;
+ }
+ str[i]='\0';
+ /*
+ int j = 0;
+ int k = i-1;
+ char temp;
+ while(j<k)
+ {
+ temp = str[j];
+ str[j] = str[k];
+ str[k] = temp;
+ j++;
+ k--;
+ }
+*/
+
+
+ /*
+ char* strfloat;
+ floatpart = floatpart*1000000000;
+ int l = 0;
+ while(floatpart)
+ {
+ strfloat[l] = ((unsigned int)floatpart%10) + '0';
+ floatpart = floatpart/10;
+ l++;
+ }
+ while(*strfloat!='\0')
+ {
+ str[i+1] = strfloat[l-1];
+ i++;
+ l--;
+ }
+ */
+
+ while(*str!='\0')
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = *str; // Put data into buffer, sends the data
+ str++;
+ }
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (10); // Put data into buffer, sends the data
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (13); // Put data into buffer, sends the data
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmitu8.c b/2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmitu8.c
new file mode 100644
index 00000000..8978cc00
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/dAVRUARTTransmitu8.c
@@ -0,0 +1,21 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Char.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 dAVRUARTTransmitu8(uint8 data)
+{
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = data; // Put data into buffer, sends the data
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmita.c b/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmita.c
new file mode 100644
index 00000000..fea9319d
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmita.c
@@ -0,0 +1,26 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit String.
+
+
+#include "AVRPeripheralUART.h"
+
+
+uint8 gAVRUARTTransmita(uint8 *x, int size)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ gAVRUARTTransmits(x[i]);
+ }
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmits.c b/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmits.c
new file mode 100644
index 00000000..502f2727
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmits.c
@@ -0,0 +1,31 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit String.
+
+
+#include "AVRPeripheralUART.h"
+
+
+uint8 gAVRUARTTransmits(char* msg,int size)
+{
+ while(*msg!='\0')
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = *msg; // Put data into buffer, sends the data
+ msg++;
+ }
+while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (10); // Put data into buffer, sends the data
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (13); // Put data into buffer, sends the data
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmitu8.c b/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmitu8.c
new file mode 100644
index 00000000..f3384068
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/gAVRUARTTransmitu8.c
@@ -0,0 +1,24 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit String.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 gAVRUARTTransmitu8(uint8 *msg)
+{
+ while(*msg!='\0')
+ {
+ AVRUARTTransmitChar(*msg);
+ msg++;
+ }
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmita.c b/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmita.c
new file mode 100644
index 00000000..8d0fcd47
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmita.c
@@ -0,0 +1,27 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Signed Integer Values.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 i16AVRUARTTransmita(int16 *x, int size)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ i16AVRUARTTransmits(x[i]);
+ }
+ return 0;
+}
+
+
diff --git a/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmits.c b/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmits.c
new file mode 100644
index 00000000..4d907762
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmits.c
@@ -0,0 +1,73 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Signed Integer Values.
+
+
+#include "AVRPeripheralUART.h"
+
+
+uint8 i16AVRUARTTransmits(int16 data)
+{
+ uint8 temp1;
+ uint8 temp2;
+ uint8 temp3;
+ uint8 temp4;
+ uint8 temp5;
+ if(data<0)
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (45); // Put data into buffer, sends the data
+ }
+ data = abs(data);
+ temp1 = data/10000;
+ if(temp1==0);
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp1); // Put data into buffer, sends the data
+ }
+ data = data % 10000;
+ temp2 = data/1000;
+ if((temp1==0)&(temp2==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp2); // Put data into buffer, sends the data
+ }
+ data = data % 1000;
+ temp3 = data/100;
+ if((temp1==0)&(temp2==0)&(temp3==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp3); // Put data into buffer, sends the data
+ }
+ data = data % 100;
+ temp4 = data/10;
+ if((temp1==0)&(temp2==0)&(temp3==0)&(temp4==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp4); // Put data into buffer, sends the data
+ }
+ temp5 = data % 10;
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp5); // Put data into buffer, sends the data
+
+
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (10); // Put data into buffer, sends the data
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (13); // Put data into buffer, sends the data
+ return 0;
+}
+
diff --git a/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmitu8.c b/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmitu8.c
new file mode 100644
index 00000000..99638c77
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/i16AVRUARTTransmitu8.c
@@ -0,0 +1,31 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Signed Integer Values.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 i16AVRUARTTransmitu8(int16 data)
+{
+ uint16 temp1;
+ uint16 temp2;
+ temp1 = abs(data)/100;
+ if(data<0)
+ AVRUARTTransmitChar(45);
+ AVRUARTTransmitChar(48+temp1);
+ temp1 = abs(data) - temp1*100;
+ temp2 = temp1;
+ temp1 = temp1/10;
+ AVRUARTTransmitChar(48+temp1);
+ temp2 = temp2 - temp1*10;
+ AVRUARTTransmitChar(48+temp2);
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmita.c b/2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmita.c
new file mode 100644
index 00000000..10345738
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmita.c
@@ -0,0 +1,25 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Signed Integer Values.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 i8AVRUARTTransmita(int8 *x,int size)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ i8AVRUARTTransmits(x[i]);
+ }
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmits.c b/2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmits.c
new file mode 100644
index 00000000..6b8c20fb
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/i8AVRUARTTransmits.c
@@ -0,0 +1,26 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Signed Integer Values.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 i8AVRUARTTransmits(int8 data)
+{
+ uint8 temp1;
+ temp1 = abs(data);
+ if(data<0)
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (45); // Put data into buffer, sends the data
+ u8AVRUARTTransmits(temp1);
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmita.c b/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmita.c
new file mode 100644
index 00000000..8b8e6301
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmita.c
@@ -0,0 +1,28 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Unsigned Integer Values.
+
+#include "AVRPeripheralUART.h"
+
+uint8 u16AVRUARTTransmita(uint16 *x, int size)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ u16AVRUARTTransmits(x[i]);
+ }
+ return 0;
+}
+
+
+
+
diff --git a/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmits.c b/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmits.c
new file mode 100644
index 00000000..3cfb4a27
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmits.c
@@ -0,0 +1,87 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Unsigned Integer Values.
+
+#include "AVRPeripheralUART.h"
+
+uint8 u16AVRUARTTransmits(uint16 data)
+{
+ uint8 temp1;
+ uint8 temp2;
+ uint8 temp3;
+ uint8 temp4;
+ uint8 temp5;
+ temp1 = data/10000;
+ if(temp1==0);
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp1); // Put data into buffer, sends the data
+ }
+ data = data % 10000;
+ temp2 = data/1000;
+ if((temp1==0)&(temp2==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp2); // Put data into buffer, sends the data
+ }
+ data = data % 1000;
+ temp3 = data/100;
+ if((temp1==0)&(temp2==0)&(temp3==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp3); // Put data into buffer, sends the data
+ }
+ data = data % 100;
+ temp4 = data/10;
+ if((temp1==0)&(temp2==0)&(temp3==0)&(temp4==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp4); // Put data into buffer, sends the data
+ }
+ temp5 = data % 10;
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp5); // Put data into buffer, sends the data
+
+
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (10); // Put data into buffer, sends the data
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (13); // Put data into buffer, sends the data
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmitu8.c b/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmitu8.c
new file mode 100644
index 00000000..a68a5aa9
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/u16AVRUARTTransmitu8.c
@@ -0,0 +1,38 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Unsigned Integer Values.
+
+#include "AVRPeripheralUART.h"
+
+uint8 u16AVRUARTTransmitu8(uint16 data)
+{
+ uint8 temp1;
+ uint8 temp2;
+ uint8 temp3;
+ uint8 temp4;
+ temp1 = data/10000;
+ dAVRUARTTransmitu8(48+temp1);
+ temp1 = data - temp1*10000;
+ temp2 = temp1;
+ temp1 = temp1/1000;
+ dAVRUARTTransmitu8(48+temp1);
+ temp1 = temp2 - temp1*1000;
+ temp3 = temp1;
+ temp1 = temp1/100;
+ dAVRUARTTransmitu8(48+temp1);
+ temp1 = temp3 - temp1*100;
+ temp4 = temp1;
+ temp1 = temp1/10;
+ dAVRUARTTransmitu8(48+temp1);
+ temp1 = temp4 - temp1*10;
+ dAVRUARTTransmitu8(48+temp1);
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/u8AVRUARTReceiveCharu8.c b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTReceiveCharu8.c
new file mode 100644
index 00000000..df0a55b7
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTReceiveCharu8.c
@@ -0,0 +1,20 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Receive Char.
+
+#include "AVRPeripheralUART.h"
+
+uint8 u8AVRUSARTReceiveCharu8()
+{
+ while ( !(UCSRA & (1<<RXC)) ) ; // Wait for data to be received
+ return UDR; // Get and return received data from buffer
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/u8AVRUARTSetups.c b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTSetups.c
index f311500a..085ac6e3 100644
--- a/2.3-1/src/c/hardware/avr/uart/u8AVRUARTSetups.c
+++ b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTSetups.c
@@ -1,84 +1,143 @@
-// Function to initialise uart interface of AVR
-//
-// Calling Sequence
-// u8AVRUARTSetups(uint8 mode, uint8 baudrate, uint8 stopbits, uint8 parity)
-//
-// Parameters
-// mode : Mode of usart interface (0-Normal mode, 1-Double speed mode,
-// 2-Synchronous master mode)
-// baudrate : Baudrate for communication. Refer AVRPeripheralUART.h
-// for available options)
-// stopbits : No. of stopbits (0-1) for stopbits 1 and 2 resp.
-// parity: set parity bit. (0-disabled, 1-Even parity, 2-Odd parity)
-//
-//
-// Description
-// This function initialises uart interface for AVR. Available modes are
-// Normal mode (0), Double speed mode (1), Synchronous master mode(2). 'baudrate'
-// decides baudrate for communication. For baudrate settings, variable
-// 'XTAL_FREQUENCY' is required. 'stopbits' sets no of stopbits for data
-// packet. 0 for 1 stopbit and 1 for 2 stopbits. 'parity' decides parity bit
-// for communication. 0 for disabling parity bit, 1 for even parity and 2
-// for odd parity.
-//
-// Authors
-// Siddhesh Wani
-//
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Setup Serial communication for ATmega16.
+
#include "AVRPeripheralUART.h"
-uint8 u8AVRUARTSetups(uint8 mode, uint8 baudrate, uint8 stopbits, uint8 parity)
+uint8 u8AVRUARTSetups(uint8 mode, uint32 baudrate, uint8 stopbits, uint8 parity)
+{
+//Enable UART and USART
+ UCSRC |= (1<<URSEL);
+ UCSRB |= (1<<TXEN)|(1<<RXEN);
+
+ switch (mode) //According to mode set bits UMSEL and U2X
+{
+ case 0: //Normal mode
+ UCSRC &= ~(1<<UMSEL); //Clear bit 6 UMSEL and U2X=0
+ UCSRA &= ~(1<<U2X);
+ UCSRC &= ~(1<<UCPOL); // Clock polarity bit
+ break;
+
+ case 1: //Double speed mode
+ UCSRC &= ~(1<<UMSEL); //Clear bit 6 UMSEL and U2X=1
+ UCSRA |= (1<<U2X);
+ UCSRC &= ~(1<<UCPOL); //Clock polarity bit
+ break;
+
+ case 2: //Synchronous mode
+ UCSRC |= (1<<UMSEL); //Set bit 6 UMSEL and set clock polarity
+ UCSRC |= (1<<UCPOL);
+ break;
+}
+
+//Set stop bits
+if(stopbits == 0)
+{
+ UCSRC &= ~(1<<USBS); // 1 stopbit
+}
+else UCSRC |= (1<<USBS); //2 stopbits
+
+//Set parity bit settings
+switch(parity)
+{
+ case 0: // Parity disabled
+ UCSRC &= ~(1<<UPM1); //UPM1:0=0
+ UCSRC &= ~(1<<UPM0);
+ break;
+
+ case 1: // Even parity
+ UCSRC |= (1<<UPM1); //UPM1:0 = 2
+ UCSRC &= ~(1<<UPM0);
+ break;
+
+ case 2: // Odd parity
+ UCSRC |= (1<<UPM1); //UPM1:1 = 3
+ UCSRC |= (1<<UPM0);
+ break;
+}
+
+//Set baudrate
+UCSRC &= ~(1<<URSEL);
+switch(baudrate)
{
- switch (mode) //According to mode set bits UMSEL and U2X
- {
- case 0: //Normal mode
- UCSRC &= ~(1<<6); //Clear bit 6 UMSEL
- break;
-
- case 1: //Double speed mode
- UCSRC &= ~(1<<6); //Clear bit 6 UMSEL
- break;
-
- case 2: //Synchronous master mode
- UCSRC |= (1<<6); //Set bit 6 UMSEL
- break;
- }
-
- if(stopbits == 0)
- { // 1 stopbit
- UCSRC &= ~(1<<3);
- }
- else
- { // 2 stopbits
- UCSRC |= (1<<3);
- }
-
- //Set parity bit settings
- switch(parity)
- {
- case 0: // Parity disabled
- UCSRC &= ~(3<<4); //UPM1:0=0
- break;
- case 1:// Even parity
- UCSRC |= (1<<5); //UPM1:0 = 2
- UCSRC &= ~(1<<4);
- break;
- case 2:// Odd parity
- UCSRC |= (1<<5); //UPM1:1 = 3
- UCSRC |= (1<<4);
- break;
- }
-
- //Set baud rate
- # define BAUD baudrate
- #include "util/setbaud.h"
- UBRRH = UBRRH_VALUE;
- UBRRL = UBRRL_VALUE;
- #if USE_2X
- UCSRA |= (1 << U2X);
- #else
- UCSRA &= ~(1 << U2X);
- #endif
- return 0;
+ case 2400:
+ UBRRL = 0xA0;
+ UBRRH = 0x01;
+ break;
+
+ case 4800:
+ UBRRL = 0xCF;
+ UBRRH = 0x00;
+ break;
+
+ case 9600:
+ UBRRL = 0x67;
+ UBRRH = 0x00;
+ break;
+
+ case 14400:
+ UBRRL = 0x44;
+ UBRRH = 0x00;
+ break;
+
+ case 19200:
+ UBRRL = 0x33;
+ UBRRH = 0x00;
+ break;
+
+ case 28800:
+ UBRRL = 0x22;
+ UBRRH = 0x00;
+ break;
+
+ case 38400:
+ UBRRL = 0x19;
+ UBRRH = 0x00;
+ break;
+
+ case 57600:
+ UBRRL = 0x10;
+ UBRRH = 0x00;
+ break;
+
+ case 768000:
+ UBRRL = 0x0C;
+ UBRRH = 0x00;
+ break;
+
+ case 115200:
+ UBRRL = 0x08;
+ UBRRH = 0x00;
+ break;
+
+ case 230400:
+ UBRRL = 0x03;
+ UBRRH = 0x00;
+ break;
+
+ case 250000:
+ UBRRL = 0x03;
+ UBRRH = 0x00;
+ break;
+
+ case 1000000:
+ UBRRL = 0x00;
+ UBRRH = 0x00;
+ break;
}
+//Set data format
+UCSRC|= (1<<URSEL)|(1<<UCSZ0)|(1<<UCSZ1);
+
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmita.c b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmita.c
new file mode 100644
index 00000000..14e2a0ea
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmita.c
@@ -0,0 +1,26 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Char.
+
+
+#include "AVRPeripheralUART.h"
+
+
+uint8 u8AVRUARTTransmita(uint8* x, int size)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ u8AVRUARTTransmits(x[i]);
+ }
+ return 0;
+}
diff --git a/2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmits.c b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmits.c
new file mode 100644
index 00000000..e7e5c716
--- /dev/null
+++ b/2.3-1/src/c/hardware/avr/uart/u8AVRUARTTransmits.c
@@ -0,0 +1,60 @@
+/* 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: Ashish Kamble
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+//Function to Transmit Char.
+
+
+#include "AVRPeripheralUART.h"
+
+uint8 u8AVRUARTTransmits(uint8 data)
+{
+ uint8 temp1;
+ uint8 temp2;
+ temp1 = data;
+ data = data/100;
+ if(data==0);
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+data); // Put data into buffer, sends the data
+ }
+ temp1 = temp1 - data*100;
+ temp2 = temp1;
+ temp1 = temp1/10;
+ if((data==0)&(temp1==0));
+ else
+ {
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp1); // Put data into buffer, sends the data
+ }
+ temp2 = temp2 - temp1*10;
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (48+temp2); // Put data into buffer, sends the data
+
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (10); // Put data into buffer, sends the data
+ while ( !( UCSRA & (1<<UDRE)) ) ; // Wait for empty transmit buffer
+ UDR = (13); // Put data into buffer, sends the data
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/2.3-1/src/c/hardware/avr/util/u16AVRSleeps.c b/2.3-1/src/c/hardware/avr/util/u16AVRSleeps.c
index 4d81c964..a6a7e508 100644
--- a/2.3-1/src/c/hardware/avr/util/u16AVRSleeps.c
+++ b/2.3-1/src/c/hardware/avr/util/u16AVRSleeps.c
@@ -1,8 +1,15 @@
-//Function to introduce specific delay in milliseconds
-//
-//Authors
-// Siddhesh Wani
+// Copyright (C) 2017 - 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
+// Organization: FOSSEE, IIT Bombay
+// Author: Siddhesh Wani
+// Email: toolbox@scilab.in
+
+//Function to introduce specific delay in milliseconds
#include "AVRUtil.h"