summaryrefslogtreecommitdiff
path: root/2.3-1/macros
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/macros')
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.binbin14056 -> 14064 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.sci12
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRADCSetup.binbin4168 -> 4168 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRADCSetup.sci2
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRPWMSetup.binbin0 -> 5760 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci39
-rw-r--r--2.3-1/macros/Hardware/AVR/libbin836 -> 860 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/names1
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.binbin929056 -> 932856 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci28
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.binbin24080 -> 24256 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.sci1
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.binbin25384 -> 25584 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.sci1
-rw-r--r--2.3-1/macros/findDeps/getAllSources.binbin152368 -> 152368 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllSources.sci2
16 files changed, 77 insertions, 9 deletions
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
index 4513310c..642e75c3 100644
--- a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
index 1d67b601..dffb9726 100644
--- a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
@@ -34,6 +34,12 @@ C_SCI2CHeader(HeaderFileName);
PrintStringInfo('#ifndef '+tmpfname+'_h',HeaderFileName,'file','y');
PrintStringInfo('#define '+tmpfname+'_h',HeaderFileName,'file','y');
PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo('# define ' + OutFormat + '1 1' ,HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
PrintStringInfo('** --- SCI2C Includes. --- ',HeaderFileName,'file','y');
PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
@@ -51,12 +57,6 @@ PrintStringInfo('extern ""C"" {',HeaderFileName,'file','y');
PrintStringInfo('#endif',HeaderFileName,'file','y');
PrintStringInfo('/*',HeaderFileName,'file','y');
PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
-PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y');
-PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
-PrintStringInfo('*/',HeaderFileName,'file','y');
-PrintStringInfo('# define ' + OutFormat + '1' ,HeaderFileName,'file','y');
-PrintStringInfo('/*',HeaderFileName,'file','y');
-PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
PrintStringInfo('** --- Prototypes. --- ',HeaderFileName,'file','y');
PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
PrintStringInfo('*/',HeaderFileName,'file','y');
diff --git a/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin b/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin
index 6cf45dc9..44e3d790 100644
--- a/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin
+++ b/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
index d9897fc3..ce9117d0 100644
--- a/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
+++ b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
@@ -2,7 +2,7 @@ function AVRADCSetup(prescalar,adc_ref)
// Function to initialise ADC of AVR
//
// Calling Sequence
-// AVRSetupADC(uint8 prescalar, uint8 adc_ref)
+// AVRADCSetup(uint8 prescalar, uint8 adc_ref)
//
// Parameters
// prescalar: prescalar to be used for generating ADC clock (0-7)
diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin
new file mode 100644
index 00000000..6ae56fda
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci
new file mode 100644
index 00000000..7e1c234f
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci
@@ -0,0 +1,39 @@
+function AVRPWMSetup(timer, prescalar, waveform_mode, output_mode)
+// Function to initialise PWM of AVR
+//
+// Calling Sequence
+// AVRSetupADC(timer, prescalar, waveform_mode, 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)
+//
+// See also
+// AVRPMWSetDuty
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for AVR.
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib
index d08afbd3..aa4d6113 100644
--- a/2.3-1/macros/Hardware/AVR/lib
+++ b/2.3-1/macros/Hardware/AVR/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/names b/2.3-1/macros/Hardware/AVR/names
index 6e5b61bd..afd171ec 100644
--- a/2.3-1/macros/Hardware/AVR/names
+++ b/2.3-1/macros/Hardware/AVR/names
@@ -2,6 +2,7 @@ AVRADCSetup
AVRDigitalIn
AVRDigitalOut
AVRDigitalSetup
+AVRPWMSetup
AVRReadADC
GetAVRSupportFunctions
GetPeripheral
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
index b2642d44..f790c5e8 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index 6d829ceb..c6423531 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -982,7 +982,6 @@ ClassName = 'Max';
// --- Class Annotation. ---
-disp("Inside Max Function");
PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
PrintStringInfo('NIN= 1',ClassFileName,'file','y');
@@ -4033,6 +4032,33 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
//------------------------------------
+//---- Class AVRDigitalOut -----------
+//------------------------------------
+ClassName = 'AVRDigitalIn';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalIn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
//---- Class AVRADCSetup -----------
//------------------------------------
ClassName = 'AVRADCSetup';
diff --git a/2.3-1/macros/findDeps/getAllHeaders.bin b/2.3-1/macros/findDeps/getAllHeaders.bin
index 4314c53a..50ce832f 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.bin
+++ b/2.3-1/macros/findDeps/getAllHeaders.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci
index f5c74bd0..697a0fa6 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.sci
+++ b/2.3-1/macros/findDeps/getAllHeaders.sci
@@ -139,6 +139,7 @@ function allHeaders = getAllHeaders(OutFormat)
AVR_headers = [
"src/c/hardware/avr/includes/AVRPeripheralGPIO.h"
"src/c/hardware/avr/includes/AVRPeripheralADC.h"
+ "src/c/hardware/avr/includes/AVRUtil.h"
];
if OutFormat == "StandAlone"
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.bin b/2.3-1/macros/findDeps/getAllInterfaces.bin
index b49fdbf0..c28ac331 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.bin
+++ b/2.3-1/macros/findDeps/getAllInterfaces.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci
index 5b52c71a..14249d08 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.sci
+++ b/2.3-1/macros/findDeps/getAllInterfaces.sci
@@ -133,6 +133,7 @@ function allInterfaces = getAllInterfaces(OutFormat)
AVR_interfaces = [
"src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h"
"src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h"
+ "src/c/hardware/avr/interfaces/int_AVRUtil.h"
];
if OutFormat == "StandAlone"
diff --git a/2.3-1/macros/findDeps/getAllSources.bin b/2.3-1/macros/findDeps/getAllSources.bin
index 49439778..b1591ac4 100644
--- a/2.3-1/macros/findDeps/getAllSources.bin
+++ b/2.3-1/macros/findDeps/getAllSources.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci
index 956f7be1..325d4b23 100644
--- a/2.3-1/macros/findDeps/getAllSources.sci
+++ b/2.3-1/macros/findDeps/getAllSources.sci
@@ -831,7 +831,7 @@ function allSources = getAllSources(OutFormat)
"src/c/hardware/avr/gpio/u8AVRDigitalIns.c"
"src/c/hardware/avr/adc/u8AVRADCSetups.c"
"src/c/hardware/avr/adc/u8AVRReadADCs.c"
- "src/c/scilab-arduino/sleep/u16sleeps.c"
+ "src/c/hardware/avr/util/u16AVRSleeps.c"
];